Preface
I recently wrote a mobile AR system from scratch. There are too many pitfalls !!! The entire project uses the OpenCV third-party library, but for cameras, the method is basically the same as that of native Camera.
Implementation
Taking JavaCameraView of OpenCV as an example, you must first customize your own Camera
When I try to use OPENCV to call the camera to do the center position detection of the circle in the picture, I find that the program can successfully invoke the integrated camera of the note, but cannot invoke the external USB camera. (Used for OpenCV1.0 + VC6.0)The following programs are used:#include "Cv.h"#include
).
cv_cap_prop_saturation Saturation of the image (only for cameras).
Cv_cap_prop_hue Hue of the image (only for cameras).
Cv_cap_prop_gain Gain of the image (only for cameras).
cv_cap_prop_exposure Exposure (only for cameras).
Cv_cap_prop_convert_rgb The Boolean flags indicating whether images should is converted to RGB.
Cv_cap_prop_white_balance_u The U value of the whitebalance setting (Note:only supported by DC1394 v 2.x backend currently)
Cv_cap_prop_white_balance_v The V valu
/* I have not systematically read the books of opencv. However, during this period, I want to create a program for camera identification and locating specific color blocks, and I have changed it from the existing one. This is a program for collecting real-time images from the camera. It also displays the foreground and background images of the collected images. A
), checks if initialization succeeded, returns successfully True return value: Boolean "" "while (Cap.isopened ()): #循环读取每一帧" "" Function Name: Cap.read () function: Returns two values first returns a Boolean value if the video read is correct, true if Error, or false, can also be used to determine whether to the end of the video and return a value for each frame of the image, the value is a three-dimensional matrix universal Receive method is: Ret,frame = Cap.read (); So ret store Bo
Camera Calibration
1.OpenCV Camera Calibration
OPENCV provides specific calibration strategies and documentation that can be used directly to illustrate the location of the document "D:\opencv\sources\doc\tutorials\calib3d\camera_calibration";
The location of the routine "
What to do without a USB camera.
It's okay to have an Android phone, we can turn it into a webcam.
1. Install a mobile phone called [IP Camera] app, get IP address, account password
2. Install Python and OpenCV
3. Execute the Python script below, and notice that you want to change the IP address to the one displayed on your phone.
#coding =utf-8
Import CV2.CV as
First, create a new source program file for. CPP, for example,
Gedit Test.cpp
Add the following program to the file:
#include Save exit. The compilation chain is delivered as an executable file.
g++ test.cpp-o test-i/usr/local/include/opencv-i/usr/local/include/opencv2-l/usr/local/lib/*.so
Insert Camera, run program
./testDone.
cvcreatecameracapture (), initialize get video from
Last night to OPENCV study notes to tidy up, when running OPENCV call camera program always appear assertion failed (size.width>0 size.height>0) in CV:: Imshow, the last look at the data to know is because the call Imshow () function when the mat is empty caused, may be at the beginning of the camera is not initialize
Transplant opencv to the development board, and collect and use the camera on the Development Board 6410 (1), opencv6410
Recently, we have been porting opencv qt to the development board tiny6410 for human eye detection and face recognition. We can run programs on virtual machines, but there are a bunch of errors on the Development Board.
Porting qt is easy to wr
;
/**
*
* Use JAVACV/OPENCV to capture camera images
*
* There is functions in this demo:
* 1) Show real-time camera images
* 2) Capture camera images by mouse-clicking anywhere in the JFrame,
* The JPG file is saved in a hard-coded path.
*
* @author Ljs
* 2011-08-19
*
*/
Public class Ca
Recently, we need to use OPENCV Computer Vision Library to read and display and save the video. As a result of the previous use of notebooks, the desktop external USB camera, there are a lot of problems, always show memory problems, Google, Baidu large half-day, summed up the way the great God proposal, finally solved the problem, the problem and code to share to everyone, avoid detours. The cause of the pr
Note: This example is from China's digital art online. It has not been debugged and is reprinted here. It is just for your reference. Source of the original is: http://www.cgblog.com.cn/e/DoPrint? Classid = 29 id = 9742.
===
Recently, I saw someone using flash and the camera to make an interactive game. I thought it was very interesting. I used the library function of opencv and the VC model and made a si
Recently, I saw someone using flash and the camera to make an interactive game. I thought it was very interesting. I used the library function of opencv and the VC model and made a similar haha. The effect is not very good. Next we will introduce how to connect a camera to a computer. after starting the program, there will be two beating yellow balls in the video
# Include
Still that piece of code. Yesterday I understood the meaning of argche argv in the main function parameter table. If you compile and run it directly, it is equivalent to inputting try.exe in the command line, that is, argc is 1.
Go to the command line to run
Result
The result is that you can select a video source and click OK to return to the system in seconds. You can check the development documentation and find that the cvcreatecameracapture (INT index) function can select a
Many online users say that the recorded video file is 0 kb or cannot be opened.
In fact, this is mainly due to two reasons:
1. The encoding format of the videos generated by OpenCV is related.
2. It is related to illegal withdrawal (I will solve it in 200 cycles. Or you can use Timer. Or use another key)
The solution I personally recommend is as follows:
1. Download an XviD encoder and install it.
2. Use the following code for testing:
1 # include "
Using OpenCV with the Raspberry Pi camera2015.11.21 created by HuangtaoRaspi-config"Camera" and select "Enable"Install Pi Camera:===================http://www.raspberrypi.org/archives/3890Test Pi Camera:===============RASPISTILL-T 10000Ok.Https://github.com/robidouille/robidouille/tree/master/raspicam_cv===============
Because the project needs to use OPENCV to read multiple cameras, but can not determine the number of the camera. View OpenCV source, the camera's ID is mainly used listdevices this function, the function itself to extract out, according to the vector
int listdevices (vector
The results are as follows:
Based on this number, you can choose the
Heroes of the Forum, the younger brother recently encountered a confusion, beginner qt on the emergence of such problems, so the top of the risk of being scolded, come to ask, thank you ha! The problem is as follows11:12:27:running steps for Project Opencvcamera ...11:12:27:configuration unchanged, skipping qmake step.11:12:27:starting: "/usr/bin/make"-Wmake:entering directory '/home/tl/qt/qt_program/camera/opencvcamera-build-desktop-debug '/home/tl/q
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.