how to interface baumer camera or kinect V2 with opencv?
I have the program for opencv that works with the webcam. But I am finding it difficult to use opencv with Kinect camera or Baumer camera. I want to know how to interface Baumer camera or Kinect V2 with opencv?
See also questions close to this topic
unable to install opencv in mac for python.. below is the error. else suggest a better way to install opencv
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: dlopen(/usr/local/lib/python3.7/site-packages/cv2.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/glog/lib/libglog.0.3.5.dylib Referenced from: /usr/local/Cellar/opencv/3.4.3_1/lib/libopencv_sfm.3.4.dylib Reason: image not found
above is the error - how to fix ?
Does openCV distance transform work for horizontal distance but not for vertical distance?
I am using openCV distance transform in python to find maximum width of line segments. When i use it for vertical lines i.e. when the width is horizontal, it works perfectly like this image.
However, for nearly horizontal lines i.e. when the width is supposed to be vertical, it gives almost 10 times bigger value for an image like this.
output_canvas = np.zeros(image.shape, dtype=np.uint8) cv2.drawContours(output_canvas, cnt, i, (255, 255, 255), -1) dist = cv2.distanceTransform(output_canvas, cv2.DIST_L2, 3) _, mv, _, mp = cv2.minMaxLoc(dist) width=mv*2 #(half)width*2 print(width, mp) # width, pos draw = cv2.cvtColor(output_canvas, cv2.COLOR_GRAY2BGR) cv2.line(draw, (0, mp), (output_canvas.shape, mp), (0, 0, 200), 3, -1)
How can i make my program calculate width regardless of contour orientation ?
FFmpeg change output to specific pixel format?
I am working on an openCV project, I have a stable running variant that is taking input from an HDMI capture card and using FFmpeg to output to a v4L2 loopback device (/dev/video0) my openCV project takes its input from /dev/video0.
The issue comes when I try to use an rtsp feed, the following command works to send the feed to my loopback device:
ffmpeg -rtsp_transport tcp -i rtsp://@192.168.1.27:552//stream1 -acodec rawvideo -vcodec rawvideo -f v4l2 /dev/video0
And I am able to view that feed with VLC (on /dev/video0) no problem, however when I feed it to my openCV app, I get the following error:
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
When I run
v4l2-ctl -d /dev/video0 --allon both working and non working variants this is what I get:
Format Video Output: Width/Height : 1920/1080 Pixel Format : 'UYVY' Field : None Bytes per Line : 3840 Size Image : 4147200 Colorspace : sRGB Transfer Function : Default YCbCr Encoding : Default Quantization : Default Flags :
Format Video Output: Width/Height : 1280/720 Pixel Format : 'YU12' Field : None Bytes per Line : 1280 Size Image : 1382400 Colorspace : sRGB Transfer Function : Default YCbCr Encoding : Default Quantization : Default Flags :
So I am concluding that the pixel format 'YU12' is not compatible with openCV while format 'UYVY' is. If it's possible, how do I set the output of FFmpeg to be in pixel format UYVY when the input is YU12?
How to create button in Unity that I can press using Kinect with my hand?
At university we are making a Kinect game in unity and I am supposed to make a start menu. And I simply don't know where to start. How to make button and make them react to touch or hover or whatever. I found this but don't really know how to implement it. https://gist.github.com/paganini24/77dc8b19f339f8bb112c
Kinect depth to point cloud
I have a Kinect v2 and I want to get from a depth image or RGB-D to a point cloud. I found some C++ code to do this, but I would like to do this in C#. Does anyone have experience in this and could help me out?
Two engaged persons in KinectRegion, how identifying which one clicked a button?
I am implementing a game and want to add a two-player game mode, but I am struggling to detect which hand cursor clicked on a button. I can read out the trackingIDs with kinectRegion.EngagedBodyTrackingIds, but I can't solve the problem with the identification. Has someone any idea, how I can get this information who of the players triggered the click event?