[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' 카테고리의 다른 글

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
ValueError: Cannot load <class 'diffusers.models.controlnet.ControlNetModel'> from / because the following keys are missing: Please make sure to pass `low_cpu_mem_usage=False` and `device_map=None` if you want to randomly initialize those weights or else  (1) 2024.08.13
'Error Note' 카테고리의 다른 글
  • 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'
  • ncclInvalidArgument: Invalid value for an argument.
ga.0_0.ga
ga.0_0.ga
    반응형
    250x250
  • ga.0_0.ga
    ##뚝딱뚝딱 딥러닝##
    ga.0_0.ga
  • 전체
    오늘
    어제
    • 분류 전체보기 (180)
      • Paper Review (50)
        • 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)
        • etc (10)
      • AI Research (49)
        • Deep Learning (30)
        • Artificial Intelligence (15)
        • Data Analysis (4)
      • Pytorch (10)
      • ONNX (5)
      • OpenCV (2)
      • Error Note (34)
      • Linux (2)
      • Docker (3)
      • Etc (7)
      • My Study (16)
        • Algorithm (10)
        • Project (4)
        • Interview (2)
  • 블로그 메뉴

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

  • 공지사항

  • 인기 글

  • 태그

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

  • 최근 글

  • 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'
상단으로

티스토리툴바