Bad camera image with ZXing - google-glass

I'm trying to use the ZXing library on Google Glass.
But, when I start the activity with this lines:
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.setPackage("com.google.zxing.client.android");
intent.putExtra("SCAN_MODE","QR_CODE_MODE"); // Para códigos QR
intent.putExtra("PROMPT_MESSAGE", "Cuadra el QR para escanearlo");
startActivityForResult(intent, 0);
The camera loads and I can scan any QR code, but the color that shows the camera is not the correct...
For example, the screen of the computer is blue (and sometimes orange) with the camera.
I'm using the Zxing library with this apk:
https://github.com/zxing/zxing/releases/tag/BSGlass-0.2.1
Any suggestion?
PD: I've tried to edit the file: CameraConfigurationManager.java with the instructions:
Camera.Parameters parameters = camera.getParameters();
parameters.setPreviewFpsRange(30000, 30000);
parameters.setPreviewSize(640,360);
camera.setParameters(parameters);
But it not works well yet.
Thanks so much.

Related

Publishing Left and Right video feeds in ROS using a MYNTEYE stereo camera

I'm new to ROS and OpenCV and am trying to figure things out. It seems to do anything with vision the camera needs to be calibrated. I found what looks to be a simple method of calibration in the ROS tutorials here: https://wiki.ros.org/camera_calibration/Tutorials/StereoCalibration
However one of the tutorial's assumptions is "a stereo camera publishing left and right images over ROS." I have no idea how to do this. Thanks to anyone that can help me.
This might be a separate issue but when I use the stereo camera in OpenCV it only recognizes it in one index (my built in webcam on my laptop would be 0 and the MYNTEYE would be 1). When it does display it puts both lens views in the same window so it looks like the camera is cross-eyed.
Use MYNT-EYE-ROS-Wrapper for using it
https://github.com/slightech/MYNT-EYE-ROS-Wrapper
Call
roslaunch mynteye_ros_wrapper mynt_camera_display.launch
to run the wrapper
The modified the published topic from minteye node to feed into stereo calibration node accordingly

Can OpenCV capture image from Microsoft Surface Pro camera?

Basically, I have a prototype ready with OpenCV that captures images from connected webcams. We need to ship it to customers and they include Surface Pro users, which has an integrated rear camera.
I am not sure whether it would work on that device or not i.e. whether my code would detect the integrated Surface Pro camera or not. We currently do not have access to such a machine.
So, is there a way validate this? I can think of two options:
Is there any emulator available for Surface Pro camera?
Does OpenCV provide a list of cameras which it supports?
Would really appreciate any form of assistance here!
OpenCV works via the OS camera drivers. If the Surface Pro camera appears as a normal camera to Windows OpenCV should see it as just another camera.
For record's sake - This Stack Overflow answer gives the code for iterating available devices.
And personally I can verify that OpenCV works with the Surface Pro cameras (front and rear). We are using the EMGU port of it.

Night Vision Video: Occupancy Detection using OpenCV C++

Using Raspberry Pi NoIR camera, I am trying to do occupancy detection using OpenCV for shared office space.
In order to identify vacant spots, I am using image of empty office space as a background model. Once we have the background model, I subtract the live video frame from the background image model(using cvAbsDiff) and identify the changes.
I am getting the images using a webcam mounted on the roof. The problem is to identify a person from this angle. When I work with live video, there are subtle variations (changes in chair position, physical objects or variations of camera) which act as noise. I tried using BackgroundSubtractorMOG, MOG2 but MOG and MOG2 can only do differences from a video stream but not using an image reference model.
Any inputs on possible directions will be greatly appreciated. I will be happy to share the technique with you guys that works once I have a working solution. Thanks!

Scene Text Detection in Opencv

In the new release of OpenCV (3.0), there is a module to detect texts in a camera image as shown in this page. However, the link to the demonstration codes to illustrate this module (https://github.com/Itseez/opencv/blob/master/samples/cpp/textdetection.cpp)is broken. Any idea on how to use this module? Thanks.
You can google "blob/master/samples/cpp/textdetection.cpp" and you'll find some forks. Example.
EDIT:
They have moved the whole text detection / recognition thing here! :)
http://github.com/Itseez/opencv_contrib/tree/master/modules/text

adding cliparts to image/video OpenCV

I'm building a web cam application as my C++ project in my college. I am integrating QT (for GUI) and OpenCV (for image processing). My application will be a simple web cam app that will access the web cam, show/record videos, capture images and other stuffs.
Well, I also want to put in a feature to add cliparts to captured images, or the streaming video. While on my research, I found out that there is no way we can overlay two images using OpenCV. The best alternative I was able to find was to reconfigure the whole image to add the clipart into the original image making it a single image. You see, that's not going to work for me as I have to be able to move the clipart and resize or rotate the clipart in my canvas.
So, I was wondering if anybody could tell me how to achieve the effect I want most efficiently.
I would really appreciate your help. The deadline for the project submission is closing in and its a huge bump on the road to completion. PLEEEASE... RELP!!
If you just want to stick a logo onto the openCV image then you simply define a region of interest (roi) on the destination video image and copy the source image to this (the details vary with each version of opencv)
If you want the logo to be semi transparent - like a TV channel ID - then you can copy the image but loop over the pixels writing a destination that is source_pixel/2 + dest_pixel/2;