Giter Club home page Giter Club logo

Comments (6)

kyamagu avatar kyamagu commented on July 18, 2024

Send that feature request to OpenCV developers.

On Feb 22, 2013, at 12:19, Peugas [email protected] wrote:

I'm trying to use cv.cornerSubPix but I'm having some error:(-210).
I'm using it almost the same way it is used in the camera calibration
sample.

This is my code:
corners_left_ = cv.findChessboardCorners(image_left, [10, 7]);
corners_left = cv.cornerSubPix(image_left, corners_left_);

where image_left is an RGB image (uint8) with the hole chessboard.

Error using cv.cornerSubPix
Unexpected Standard exception from MEX file.
What()
is:/home/tiago/Downloads/OpenCV-2.4.3/modules/imgproc/src/cornersubpix.cpp:70:
error: (-210) The source image must be 8-bit single-channel (CV_8UC1) in
function cvFindCornerSubPix

For me it makes no sense using a single-channel image in cv.cornerSubPix
and looking at the camera calibration sample, it is used an RGB image
(uint8).

β€”
Reply to this email directly or view it on
GitHubhttps://github.com//issues/46.

from mexopencv.

amroamroamro avatar amroamroamro commented on July 18, 2024

@peugas: you should know that cvFindChessboardCorners internally converts RGB images to grayscale..

from mexopencv.

peugas avatar peugas commented on July 18, 2024

"Send that feature request to OpenCV developers."
I'm not requesting any feature...

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

@peugas You're requesting the new feature for cv.cornerSubPix to accept RGB image;)

from mexopencv.

peugas avatar peugas commented on July 18, 2024

Sorry, my bad.
I didn't realized that I was supposed to provide an grayscale image to cv.cornerSubPix.

Maybe it's a good idea to change cv.cornerSubPix help file to something like:
"im: Source chessboard view. It must be an 8Β­bit grayscale."

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

The help description is from the official OpenCV docs.

http://docs.opencv.org/modules/imgproc/doc/feature_detection.html#cornersubpix

Actually, it makes sense to me the function only takes single channel because the definition of corner in this algorithm is defined only up to a single channel (not necessarily grayscale). And the function cannot assume RGB or BGR input if multiple channels are given. It can be any color space.

As for the help description, I can add single-channel requirement. But please keep in mind that the mexopencv api is almost always based on the official OpenCV api.

from mexopencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.