opencv / opencv/opencv-python

Filter throws error when the number of image channel is greater than 512

Open
#527 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
5.4k
Forks
1k
Avg merge
22h 17m
Merged PRs (30d)
3

Description

Expected behaviour

opencv filter should return the filtered image with the same number of channel as input, i.e.

a = np.random.randint(255, size=(100,100,600)).astype(np.uint8)
cv2.blur(a, ksize=[3,3]).shape # should be (100,100,600)
Actual behaviour

error: OpenCV(4.5.3) /tmp/pip-req-build-xw6jtoah/opencv/modules/core/src/matrix.cpp:1102: error: (-215:Assertion failed) dims <= 2 && step[0] > 0 in function 'locateROI'

Steps to reproduce
  • example code
  • Ubuntu20.04
  • x86
  • opencv-python 4.5.3
Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the repository README and its checklist, then compare the reported opencv-python 4.5.3 behavior with the OpenCV repository linked in the issue. The report names no file or test here; done would require determining whether the build toolchain or prebuilt package is responsible, or redirecting the defect to OpenCV itself.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.