Ask Your Question

shray's profile - activity

2013-08-07 16:24:00 -0600 commented question HI! I take a look to the openni_capture.cpp sample, and my question, It's possible to save the image to the disk??

I'm not sure if I understand your question correctly. If you mean code to save video files, I suggest looking at the tutorial here - http://docs.opencv.org/2.4.6/doc/tutorials/highgui/video-write/video-write.html Now, if saving a video of depth map and you want to be able view it with a media player, you will have to normalize each image and then save it.

2013-08-06 18:16:21 -0600 commented question Mac, openCV and kinect - has anybody had success?

So, when it comes to using openCV with Kinect, I haven't had much luck on my mac. But I've only begun trying. To install, openCV I compiled the source and setup the correct flags, make sure you do that as well to get openni support. http://docs.opencv.org/doc/user_guide/ug_highgui.html

2013-08-06 18:11:55 -0600 commented question Cant open capture object for Kinect

Were either of you able to solve this problem?

2013-03-03 06:41:38 -0600 asked a question minEnclosingCircle - type error for float& argument

Sorry if this happens to be a RTFM question, but I really can't figure this out.

I'm getting this error when using clag++ to compile given opencv code

Point2f cont_centr;

float temp = 0.f;

float * cont_rad;

cont_rad = &temp;

minEnclosingCircle(contours[max_idx], cont_centr, cont_rad);

ERROR: no matching function for call to 'minEnclosingCircle' minEnclosingCircle(contours[max_idx], cont_centr, cont_rad); ^~~~~~~~~~~~~~~~~~ /usr/local/include/opencv2/imgproc/imgproc.hpp:1161:19: note: candidate function not viable: no known conversion from 'float *' to 'float &' for 3rd argument; dereference the argument with * CV_EXPORTS_W void minEnclosingCircle( InputArray points,

It seems that the problem is with my third argument, but I've tried other combinations like initializing cont_rad as a float and then passing the reference, but all of them gave some error. It would be great if somebody could just look and tell me the error.

2013-02-20 03:39:36 -0600 answered a question floor of a matrix in OpenCV 2.4.3

You could just loop over every element in the matrix and do a floor on it. For loops are optimized in opencv so there should be no compromise on speed, but if you were looking for something that could be written in one line then I guess this is not the answer for you. I haven't seen any such functions in opencv, though I am currently new to it.

2013-02-20 03:31:31 -0600 received badge  Critic (source)
2013-02-18 10:27:29 -0600 received badge  Supporter (source)
2013-02-18 04:18:07 -0600 received badge  Editor (source)
2013-02-18 03:58:03 -0600 asked a question Translation transform with depth image

Hi,


Summary:

  1. Translate depth-map by <x,y,z>, which are known
  2. The new depth map has same size as the one which was input
  3. A smoother estimate than - subtraction by Z and translation by warpPerspective - would provide is thought to be needed

Explanation: I'm trying to perform a translation transformation on a depth map (only depth no intensities), so that I'm able to zoom in on a particular part of the image, while keeping the size of the matrix the same.

I.E. if my input matrix was mat_inp with size (rows, cols) of type float then I'd like my output to be mat_out with size (rows, cols) of type float with the origin translated by (X,Y,Z). I know what the translation(X, Y, Z) is. So, I'd like to move my perspective to the point (X,Y,Z), coordinates are in the frame of the initial frame(perspective). Does anyone know if an existing function exists that lets me do that?

I thought of a way to do it, but am not sure if its correct:

  1. Subtract all pixels by Z
  2. Replace negatives by zero
  3. Use warpPerspective to translate X,Y,Z

The only problem is that in case of occlusions due to a something closer than Z, I don't think I'd get a smooth new depth map. If there was a small object close by, it might make the depth map closer than what a smooth estimate should be. It seems to be that these warp methods are optimized for intensity values and that makes me wonder if a function exists that could do the translation shift for a depth map.

Sorry about the long post, any help is appreciated.