I'm looking for good library for camera calibration, I'm aware of Camera Calibration Toolbox for Matlab and OpenCV. The problem with the toolbox is that it is in Matlab and not very friendly for modifications. OpenCV on the other hand seems to be less precise (see Suriansky).
So are there any alternatives?
The paper you cite is rubbish: whoever wrote it did not bother to actually read the code.
The Matlab toolbox uses exactly the same calibration algorithms as the OpenCV code: Zhang's for the initial estimation, followed by a round of bundle adjustment. The reason they are very similar is that the author of the original implementation of the Matlab toolbox worked for a while with the Intel team that produced the calibration code in the very first release of OpenCV.
Any differences among the results they produce are most likely due to different configurations of the control parameters.
I don't understand what you mean by "not very friendly for modification". If you have Matlab, and your application can use it (it's slow), J.Y. Bouguet's code is quite easy to read and modify. On the other hand, I always found the OpenCV codebase somewhat annoyingly low-level (but understandably so, given the stress on performance).
One alternative is the camera calibration functionality in the Computer Vision System Toolbox for MATLAB. Specifically, check out the Camera Calibrator and the Stereo Camera Calibrator apps.
As mentioned by Francesco, both Matlab and OpenCV use the Zhang method. As 2022, OpenCV offers a larger range of distortion parameters thus offering more precision in the pose estimation results. However, all parameters might not be required at once. More details on these parameters are provided in the documentation:
https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga3207604e4b1a1758aa66acb6ed5aa65d
As an alternative solution to both OpenCV and Matlab, I would definitely recommend CalibPro, a web platform that allows you to upload your data and get your calibration parameters in a matter of minutes without a single line of code. CalibPro is fully compatible with OpenCV camera parameters. The platform is rapidly developing and will provide more than the pinhole camera model in the near future.
[Disclaimer]: I am the founder of CalibPro. I am happy to take any feedback on our platform or help people with their calibration.
Related
I need to find the location of an image that the user provides within an image that I provide.
It is safe to assume at the time of the analysis that the user provided image is certain to be contained within the image to be compared with.
I’ve looked through and even have some experience with Core ML and Vision image classification however I am struggling to convince myself that it is the correct way to approach this problem. I feel like the way “feature values” is handled in Vision it is almost the reverse of what I’m looking for.
My question: Is there a feature of Core ML or Vision that tackles this particular problem head on?
Other information that may be needed;
It is not safe to assume that images provided are pixel to pixel perfect due to possible resolution differences.
They may also be provided in any shape although possible to crop to a standardised shape before analysis.
Rotation will also need to be accounted for.
There would not be cases where the image is in the image twice.
Take a look at some of the feature detection and matching algorithms.
For example, you could use SIFT (scale-invariant feature transform algorithm) with RANSAC (Random sample consensus algorithm) to do exactly what you described.
If you are using OpenCV there are plenty of such algorithms which you can easily use. (FAST, Shi-Tomasi, etc.)
I think you need something like this expale in OpenCV
I am working on a crowd controlled soundsystem for a music festival. Music would be controlled by individuals and the crowd as a whole, more or less 500 people.
While searching for crowd tracking techniques, I stumbled upon this one http://www.mikelrodriguez.com/crowd-analysis/#density; Matlab code and dataset are enclosed. Are you aware of similar techniques, maybe simpler, based eg on blob detection? Do you have an idea about how well this one would perform in a real-time scenario? Is there a known way to do this with eg OpenCV?
One of my former colleagues implemented something similar (controlling a few motors according to crowd movement) using optical flow. You can analyze the frames of video from a camera, calculate optical flow between frames, and use the values to estimate the crowd movement.
OpenCV has support to perform the above tasks, and comes with good code samples. A desktop should be able to do this in real-time (you might have to tweak with image resolution).
I am not exactly sure how to interface between a C++ program and a sound system. Pure Data (PD) is an alternative, but it might not have much support for motion analysis.
I am using an Arduino to control a car and I want to make it autonomous by using a webcam to see the object I want and make the car move to this location. I need several things:
MATLAB code
Interface between MATLAB and Arduino
How do I connect between them (software, not hardware)
I need any tutorial to learn or any instructions to make my project. I see many people have done this before, but unfortunately they did not mention how to start these kind of projects.
This question is fairly broad, so I apologize in advance for my somewhat general response.
The easiest way to interface a webcam with MATLAB is to make use of the Image Acquisition Toolbox. This link provides documentation detailing how to do this.
There is a good chance that you'll also want to make use of the Image Processing toolbox in MATLAB to be able to process the acquired images to determine where to go. See this doc. Though, after you've determined more specifically how you plan to process these images, there are probably numerous algorithms that you could find online that would not explicitly require this toolbox.
As far as interfacing with Arduino is concerned, there is a support package from the MathWorks that allows you to interface MATLAB code and Simulink models with Arduino. See this link
The only other general suggestion that I have is to consider using Simulink for this project rather than MATLAB. I feel that the model based approach of Simulink is a much better fit when designing control systems.
I hope that this helps you get things started.
Hey guys, Am wondering if anybody can help me with a starting point for the design of a Neural Network system that can recognize visual patterns, e.g. checked, and strippes. I have knowledge of the theory, but little practical knowledge. And net searches are give me an information overload. Can anybody recommend a good book or tutorial that is more focus on the practical side.
Thank you!
Are you only trying to recognize patterns such as checkerboards and stripes? Do you have to use a neural network system?
Basically, you want to define a bunch of simple features on the board and use them as input to the learning system. It can often be easier to define a lot of binary features and feed them into a single-layer network (what can become essentially linear regression).
Look at how neural networks were used for learning to play backgammon (http://www.research.ibm.com/massive/tdl.html), as this will help give you a sense of the types of features that make learning with a neural network work well.
As suggested above, you probably want to reduce your image a set of features. A corner detector (perhaps the Harris method) could be used to determine features in the checkerboard pattern. Likewise, an edge detector (perhaps Canny) could be used in the stripes case. As mentioned above, the Hough transform is a good line detection method.
MATLAB's image processing toolbox contains these methods, so you might try those for rapid prototyping. OpenCV is an open-source computer vision library that also provides these tools (and many others).
I am trying to take an image and extract hand written text so that it can be read easily and zoomed in on. I would like to convert the text to vector paths.
I am not aware of any libraries that would make this as painless as possible. Any help is greatly appreciated. Examples are nice too :)
Simple iPhone Image Processing (on Google code) contains all the primitive tools you will need:
Canny edge detection
Histogram equalisation
Skeletonisation
Thresholding, adaptive and global )
Gaussian blur (used as a
preprocessing step for canny edge
detection)
Brightness normalisation
Connected region extraction
Resizing - uses interpolation
The only program I know of for the iPhone that does handwriting recognition is HWPEN. Unfortunately, it's not a library but a full application and (to make matters worse) it requires a Jailbroken phone.
I fear you must either try to get the source for HWPEN or reverse engineer it to obtain the code you need.
Barring that, you may want to write your own. There are several studies on handwriting recognition that may help.