[OpenCV] error: (-215:Assertion failed) cn == CV_MAT_CN(dstType) && ddepth >= sdepth in function 'getLinearFilter'

2025. 3. 17. 10:26·Error Note
728x90
반응형

- 전체 에러 문구   

cv2.error: OpenCV(4.9.0) /io/opencv/modules/imgproc/src/filter.simd.hpp:3231: error: (-215:Assertion failed) cn == CV_MAT_CN(dstType) && ddepth >= sdepth in function 'getLinearFilter'

 

 

OpenCV에서 seamlessClone함수 사용시 발생 할 수 있는 에러인데요.

seamlessClone()의 파라미터로 주어지는 mask와 src 이미지의 데이터 타입이 달라 발생합니다.

두 개의 데이터 타입을 맞춰주면 됩니다.

 

 

- 해결방법   

mask = mask.astype(np.uint8)

 

 

 

728x90
반응형
저작자표시 (새창열림)

'Error Note' 카테고리의 다른 글

NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.  (0) 2025.09.25
ValueError: assignment destination is read-only  (0) 2025.02.10
Missing key(s) in state_dict: "clip_model.vision_tower.vision_model.embeddings.position_ids".  (0) 2024.12.12
TypeError: load_checkpoint_and_dispatch() got an unexpected keyword argument 'force_hooks'  (0) 2024.11.29
ncclInvalidArgument: Invalid value for an argument.  (1) 2024.09.20
'Error Note' 카테고리의 다른 글
  • NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.
  • ValueError: assignment destination is read-only
  • Missing key(s) in state_dict: "clip_model.vision_tower.vision_model.embeddings.position_ids".
  • TypeError: load_checkpoint_and_dispatch() got an unexpected keyword argument 'force_hooks'
ga.0_0.ga
ga.0_0.ga
    반응형
    250x250
  • ga.0_0.ga
    ##뚝딱뚝딱 딥러닝##
    ga.0_0.ga
  • 전체
    오늘
    어제
    • 분류 전체보기 (195)
      • Paper Review (56)
        • Video Scene Graph Generation (6)
        • Image Scene Graph Generation (18)
        • Graph Model (5)
        • Key Information Extraction (4)
        • Fake Detection (2)
        • Text to Image (1)
        • Diffusion Personalization (4)
        • LLM & VLM (4)
        • etc (12)
      • AI Research (49)
        • Deep Learning (30)
        • Artificial Intelligence (15)
        • Data Analysis (4)
      • Pytorch (13)
      • ONNX (5)
      • OpenCV (7)
      • Error Note (35)
      • Linux (2)
      • Docker (3)
      • Etc (7)
      • My Study (16)
        • Algorithm (10)
        • Project (4)
        • Interview (2)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    linear regression
    Activation Function
    torch.nn
    3dinput
    ONNX
    forch.nn.functional
    dataset
    차원의 저주
    fine tuning
    알고리즘
    TypeError
    Logistic regression
    i3d
    pytorch
    pandas
    그래프신경망
    RuntimeError
    contiguous
    GCN
    Inductive bias
    HRNet
    JNI
    정규화
    dataloader
    transformer
    tensorflow
    permute
    나이브 베이즈 분류
    활성화 함수
    오차 역전파
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.0
ga.0_0.ga
[OpenCV] error: (-215:Assertion failed) cn == CV_MAT_CN(dstType) && ddepth >= sdepth in function 'getLinearFilter'
상단으로

티스토리툴바