Ask Your Question

opencvslave's profile - activity

2019-10-15 21:01:27 -0500 received badge  Notable Question (source)
2018-01-06 20:09:47 -0500 received badge  Popular Question (source)
2017-12-05 08:14:25 -0500 asked a question How to get the underlying corner detection uncertainty of findChessboardCorners

How to get the underlying corner detection uncertainty of findChessboardCorners Is there a way to obtain the uncertainty

2016-03-16 10:46:56 -0500 received badge  Student (source)
2016-01-27 19:37:35 -0500 commented answer Problem extracting descriptors of FAST opencv3

For some reason BRISK and ORB return None results. However, SIFT, SURF, and DAISY return descriptors. I'm wondering if AGAST or FAST key points are incompatible with binary feature descriptors?

2015-11-19 12:23:22 -0500 commented question Point Grey USB3 camera pixel color format

I got my BlackFly USB 3 camera working in OpenCV after reinstalling (upgrading) libusb via homebrew, and then rebuilding libdc1394 from source (The color conversion in the answer below changes a little for the BlackFly, specifically the conversion is cv2.COLOR_BAYER_BG2BGR).

2015-11-19 12:20:15 -0500 received badge  Enthusiast
2015-11-19 07:53:59 -0500 received badge  Self-Learner (source)
2015-11-18 12:04:25 -0500 answered a question Point Grey USB3 camera pixel color format

In OS X El Capitan, using OpenCV 3.0 and Python:

  1. Read the frame,

    success, frame_raw = self.capture.read()
    
  2. Then, convert the frame_raw into color using the Bayer color-scheme like this:

    For a USB 2.0 Chameleon device:

    frame_bgr = cv2.cvtColor(frame_raw, cv2.COLOR_BAYER_GR2BGR)
    

    This conversion also works for grabbing frames directly using pydc1394 in Python because the raw pixel matrix is just a Numpy array which OpenCV also uses to represent images.

    However, for a USB 3.0 BlackFly camera, the conversion in my case is as follows:

    frame_bgr = cv2.cvtColor(frame_raw[...,0], cv2.COLOR_BAYER_BG2BGR)
    
2015-11-11 14:11:02 -0500 commented question Point Grey USB3 camera pixel color format

@Eduardo: the problem is that these documents don't apply to the use of OpenCV alone (without grabbing the images from the FlyCapture API). I'm grabbing the images directly from OpenCV's back-end to libdc1394 in Mac OS X.

2015-10-31 00:50:03 -0500 commented question Does OpenCV3 support Qt4?

To answer myself. Yes, it does, and it works better (in my case) than Qt5.

2015-10-31 00:48:42 -0500 asked a question Point Grey USB3 camera pixel color format

I have a PointGrey BlackFly USB3 2MP camera that reads as three 8-bit channels in Python's Numpy array of shape (rows, cols, 3). However, each cell (pixel) has the same value, so I end up with a gray-scale image-like by default. The size of the image is correct, though.

I tried several conversions of color, but Bayer cannot go from 3 channels to anything else. Does anyone know which property to set for this VideoCapture object or any other suggestion? I'm not sure which Video Data Output it's using, perhaps it's 24-bit digital data it's giving 24-bits per pixel as (8,8,8), but maybe not.

How to find out the video format within OpenCV? If I ask for my_capture_device.get(cv2.CAP_PVAPI_PIXELFORMAT_RGB24) it says 15.0, my_capture_device.get(cv2.get(CAP_PVAPI_PIXELFORMAT_BAYER16), I get 480.0, and my_capture_device.get(cv2.get(CAP_PVAPI_PIXELFORMAT_BAYER8) I get 640.0. Any other PIXELFORMAT option gives -1.

I don't understand what these values mean. Please, help if you know how to set the color space for these PointGrey cameras. I know that OpenCV is wrapping around libdc1394 to interface the camera since PointGray doesn't provide drivers for OS X.

Thanks in advance!

2015-10-31 00:33:13 -0500 commented question read camera image incorrect

I have an PointGrey BlackFly that reads as three 8-bit channels in Python's Numpy array of shape (rows, cols, 3). However, each cell (pixel) has the same value, so I end up with a gray-scale image-like by default. I tried several conversions of color, but Bayer cannot go from 3 channels to anything else. Does anyone know which property to set for this VideoCapture object or any other suggestion? I'm not sure which Video Data Output it's using, perhaps it's 24-bit digital data it's giving 24-bits per pixel as (8,8,8), but maybe not. How to find out the video format within OpenCV? If I ask for get(CAP_PVAPI_PIXELFORMAT_RGB24) it give 15.0, get(CAP_PVAPI_PIXELFORMAT_BAYER16) gives 480.0, and get(CAP_PVAPI_PIXELFORMAT_BAYER8) gives 640.0. Any other PIXELFORMAT gives -1. I don't understand it.

2015-09-13 10:58:52 -0500 asked a question Does OpenCV3 support Qt4?

I faced highgui issues (aspect ratio of windows weren't maintained) when using Qt5 and OpenCV3 built from source.

I'm attempting to rebuild OpenCV with Qt4 support instead, but OpenCV3 Cmake configuration keeps looking for Qt5.

I short, can OpenCV3 work with Qt4 for the backend of highgui?

2015-05-29 13:17:20 -0500 commented question Fisheye undistortion with python error

Yes, I'm looking for the same kind of examples of how to use the fisheye camera model calibration in Python. I was looking at the source code in version 3 RC1 in the github master branch and the python bindings seem to be exposed for those functions in the header file at opencv/modules/calib3d/include/opencv2/calib3d.hpp. I will confirm later when I install the latest head from source.

2015-05-29 13:04:10 -0500 commented question Are all Qt New functions available for Python?

Thanks for the answer and the cool tip!

2015-05-27 23:38:44 -0500 asked a question Are all Qt New functions available for Python?

I'm able to work with trackbars in Python, but I don't see buttons available such as for doing a cv2.createButton(). Has this only been implemented for the C++ API? I guess I could hack a button with a trackbar, but it's not the same.

2013-08-16 18:19:02 -0500 received badge  Editor (source)
2013-08-16 18:16:06 -0500 answered a question getting opencv to work with pydev

Set the important Interpreter's System PYTHONPATH (Libraries)

Don't forget to add Python's Lib path, such as:

/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7

in addition to the usual site-packages

/usr/local/lib/python2.7/site-packages

Finally, add other paths for modules that only live inside eggs or that haven't been packaged (exist inside folders that don't have an __init__.py)

Nothing else really should be needed in PyDev

Pydev now auto-completes my cv2 methods as desired :)

2013-08-16 14:27:11 -0500 commented question getting opencv to work with pydev

I also keep facing this problem in one of my Eclipse installations. I'm running opencv from Homebrew. The interesting piece is that the interpreter in Pydev does recognize the cv2 library and it even autocompletes for the cv2 methods (but that maybe because it is using the interactive python shell instead of Eclipse's content assist).

However, I notice this was working on my other macbook, but it just happened that my SSD crash so I will have to a few weeks until it's fixed to verify why it worked there.