w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
  Home » OPENCV » Page 1
OpenCv - Depth Map
Will work best IMO: Use a cheap laser line (around 20$ in a tools / hardware shop), and search the laser in the image. It the lines runs over the whole billet it is one piece. If there is a break in the line or a strong disortion there are 2 billets. My idea: glm::vec3 laserColor(1,0,0); //red glm::vec3 currentColor; float maximum_color_distance = 0.1; for(int a = 0; a < image.rows;a++) {

Categories : Opencv

package opencv libraries with my own library
opencv_imgproc and opencv_highgui module have source files with the same names (for example, util.cpp). The object file util.o from opencv_highgui is overwritten by object file with the same name from opencv_imgproc. That's why you got link errors. Try to use MRI script mode of AR tool. Create a MRI script file (for example, script.mri) with the following content: create libnew.a addlib libopenc

Categories : Opencv

Adjust ps3 eye camera properties - ubuntu
Try using the v4l2-ctl tool. You can see the available controls you can adjust with: v4l2-ctl --list-ctrls and you can adjust what you want using something like: v4l2-ctl --set-ctrl exposure=96 v4l2-ctl --set-ctrl gain=30

Categories : Opencv

Conversion between cv::Mat and arma::mat
OpenCV's Mat has a pointer to its data. Armadillo has a constructor that is capable of reading from external data. It's easy to put them together. Remember that Armadillo stores in column-major order, whereas OpenCV uses row-major. I suppose you'll need to add another step for transformation, before or after. Mat opencv_mat; //opencv's mat, already transposed. mat arma_mat( reinterpret_cast<

Categories : Opencv

OpenCV Haar Classifier result table explanation
Searching for "HR" in the OpenCV source leads us to this file. Lines 1703-1707 inside CvCascadeBoost::isErrDesired print the table: cout << "|"; cout.width(4); cout << right << weak->total; cout << "|"; cout.width(9); cout << right << hitRate; cout << "|"; cout.width(9); cout << right << falseAlarm; cout << "|" << endl; cout <

Categories : Opencv

OpenCV human head (not just face) "extraction" from photographs
You may start finding omega shape in the upper part of body (image). in Omega shape you can find the upper object (head) easily, by fitting ellipse or circles (see this ). Do not forget that you can handle some background issues to get better results. This is a paper explaining some important steps

Categories : Opencv

OpenCV Undefined reference
Your errors are linker errors; you need to tell the linker to link against opencv_core and opencv_highgui. You can do this in the makefile or in the build system that creates the makefile for you (if any).

Categories : Opencv

Visual Studio 2012 with OpenCV ver 2.4.10 DLL missing error
OpenCV needs any dll you are using for your project to be in the same directory as your executable. You can either copy the dlls you need, in this case opencv_core2410d.dll into your debug folder and opencvcore2410.dll into your release folder, or set visual studio to move your executable to the bin folder. This option is under Project->Properties, and on the General page you can change the output

Categories : Opencv

What kind of stream GStreamer produce?
The stream appears to be an RTP stream encapsulated in a GDP stream, the latter of which which appears to be proprietary to GStreamer. You might be able to remove the gdppay and gdpdepay elements from your pipeline and use other RTP tools (there are plenty out there; I believe VLC supports RTP directly), but you could also use a GStreamer pipeline to pipe the depayloaded GDP stream (in this case,

Categories : Opencv

Opencv: correcting radially distorted images when chessboard images are not available
Well, there is not much to do if you don't have the camera, or at least the model of it. As you may know a usual camera model is pin-hole, this basically consist in the 3D world coordinates are transformed (mapped) to the camera image plane 2D coordinates. Camera Resectioning If you don't have access to the camera or at least two chessboard images, you can't estimate the focal, principal point,

Categories : Opencv

Identifying moving objects using optical flow
First of all - as I remember from theory - optical flow actually works best with moving camera (not with still scene & moving objects). It makes sense because it assumes same flow within neighbourhood pixels. It would be a great starting point for you to read about the lucas kanade method to understand what is going on. Second, your problem is not about to track some features, but to detect s

Categories : Opencv

Preventing information loss on image subtraction
This is how a simple convert => substract => convertAndScaleBack application would look like: input: and int main() { cv::Mat input = cv::imread("../inputData/Lenna.png", CV_LOAD_IMAGE_GRAYSCALE); cv::Mat input2 = cv::imread("../inputData/Lenna_edges.png", CV_LOAD_IMAGE_GRAYSCALE); cv::Mat input1_16S; cv::Mat input2_16S; input.convertTo(input1_16S, CV_16SC1

Categories : Opencv

How to calculate detection_score for OpenCV's face detector?
From their FAQ (http://vis-www.cs.umass.edu/fddb/faq.html) They define the detection score for a candidate window as: K*stage_when_rejected + stage_sum_for_stage_when_rejected. (Choosing K as a large value e.g., 1000) to ensure that windows rejected at stage i have higher score than those rejected at stage i-1

Categories : Opencv

error detection on food packaging -using Open Cv
It's not a trivial task by any stretch of the imagination. Two images of the same identical object will always be different according to lightning conditions, perspective, shooting angle, etc. Basically you need to: 1. Process the 2 images into "digested" data - dominant color, shapes, etcw 2. Design and run your own similarity algorithm between the 2 objects You may want to look at Feature dete

Categories : Opencv

Color levels in OpenCV
I don't know what are the "Photoshop levels". But from description, I think you should try the following: Convert your image to YUV using cvtColor. Y will represent the intensity plane. (You can also use Lab, Luv, or any similar colorspace with separate intensity component). Split the planes using split, so that the intensity plane will be a separate image. Call equalizeHist on the intensity pla

Categories : Opencv

Best Facial Landmark that can be easily extracted from NIR Image?
I would suggest flandmark, even if your intuition is the opposite - I've used it in my master thesis (which was about head pose estimation, a related topic). And if the question is whether it will work with the example image you've provided, I think it might detect features properly - even on a gray scaled image. I think in the flandmark they probably convert to image to grayscale before applying

Categories : Opencv

Finding hamming distance between ORB feature descriptors
ORB descriptors are just 32 byte uchar Mat's. the bruteforce and flann matchers do some more work, than just comparing descriptors, but if that's all you want for now, it would be a straight norm: Mat descriptor1, descriptor2; double dist = norm( descriptor1, descriptor2, NORM_HAMMING); // NORM_HAMMING2 or even NORM_L1 would make sense, too. // dist is a double, but ofc. you'd only g

Categories : Opencv

How to install third-party libraries (say opencv) with yum?
Check if epel repo is disabled by running: sudo yum repolist all If you see epel is disabled, then enable it and search: sudo yum --enablerepo=epel search opencv If you find it, then install it. If you don't find it, you may to download the source, build and install it. Should be straightforward.

Categories : Opencv

Error : CV_8U in function initialize
you will have to convert the image to single channel uchar before feeding it to BackgroundSubtractorMOG: Mat gray; cv_ptr->image.convertTo( gray, CV_8U, 255 ); // unsure about the scale. pMOG->operator()(gray, fgMaskMOG);

Categories : Opencv

Cannot connect xtion pro live with Ubuntu 12.04
you must go to a terminal and do sudo nano /etc/openni/GlobalDefaults.ini and there find UsbInterface and make sure it is not a comment (without ; at the beginning) and that is equal to 2 UsbInterface=2 I heard that this may give you problems with Kinect hardware (the same error you are getting now). But, if you use the Kinect later on and gives this problem, just comment it and it should wo

Categories : Opencv

Is it possible to combine HoG and AdaBoost algorithms for tracking?
AdaBoost is not exactly a face tracking algorithm - it's a method of increasing performance of any learning algorithms. HoG is a specific method of finding shapes and patterns on image (more exactly - describing those). You should read more on that topic: https://www.cs.princeton.edu/~schapire/papers/explaining-adaboost.pdf - nice paper on AdaBoost (if you need something more quick and dirty - ju

Categories : Opencv

NSData to cv::Mat conversion
I tried with a NSData-Category (see code below...). Not sure if all is correct. Please give me some comment on that ? (...especially the last method "- (NSData *)NSDataFromCVMat:(cv::Mat)cvMat" (any suggestions if the commented detour via an image is better or not ?? Thank you ! NSData+OpenCV.h #import <Foundation/Foundation.h> @interface NSData (NSData_OpenCV) - (NSData *)NSDataFromCVMa

Categories : Opencv

Eigenfaces facial recognition training data
Depending on how different the user looks, this could be a problem. lets say the user is wearing sunglasses, looks the wrong way,and wears a scarf. This would occlude too much of the image to properly determine if this is a face or not. Training on such images would provide horrendous results overall, because they are not something that qualifies as a face, or at least not according to the theorie

Categories : Opencv

Convert Non-zero value to one
You could use the threshold() function in OpenCV for convenience. You mention "non-zero" elements. If your matrix has negative numbers, and you still want those to be set to 1, use threshold( abs(my_mat), .. ). In general, this can also be done through this: Mat my_mat; Mat reference = Mat::zeros( rows, cols, type ); Mat result = (abs(my_mat) > reference)/255; This is longer, and probably

Categories : Opencv

When training a background subtractor, do the frames need to be in temporal sequence?
It depends on the history parameter and the frame count that you are going to use for training the model. If your frame count is much more than the history parameter (which is the case usually), then you need to set frames in temporal sequence. Or if you are going to train the background model with just a few frames, then I don't think the order is that important. But as I said, it is not the case

Categories : Opencv

How to track people across multiple camera's?
1- blob extraction is not enough to track a specific object, for people case I suggest HoG - or at least background subtraction before blob extraction, since all of the cameras have still scenes. 2- opencv <=2.4.9 uses pinhole model for stereo vision. so, before any calibration with opencv methods your fisheye images must be converted to rectilinear images first. You might try calibrating your

Categories : Opencv

How to calculate confidence score from CvSVM
just call CvSVM::predict with the returnDFVal param set to true, and it will return distances instead of class-labels

Categories : Opencv

Find if apple logo is present in target image
There are different possible ways. You can use: Surf(Speeded-Up Robust Features) detection Haar-like or LBP features ( <- you need some test images) or take a look at this tutorial-> Features2D+Homography

Categories : Opencv

C++-cli mixed types are not supported
C++/CLI ref classes can only hold .Net objects or primitive types as members. If you want to have a C++ member, you'll have to hold a pointer to it. (Which can be compiled to an integer type big enough to hold the pointer). Now if you want to check if the threads are running concurrently, you can do 2 things: Pause the program, and look at the threads window. (Debug -> Windows -> Threads) Here

Categories : Opencv

how can I use opencv to run the java code
opencv comes with its own java bindings. you will need cmake, ant, and the opencv src code to build it. javacv is a 3rd party wrapper, unfortunately mostly based on opencv's deprecated 1.0 c-api, so you will have to program java, like it was in c years ago. mixed blessing..

Categories : Opencv

How to calculate image histogram of 32bit floating point image in OPenCV
Well I've done this many times. Something like so: cv::Mat matSrc; // this is a CV_32FC1 normalised image int nHistSize = 65536; float fRange[] = { 0.0f, 1.0f }; const float* fHistRange = { fRange }; cv::Mat matHist; cv::calcHist(&matSrc, 1, 0, cv::Mat(), matHist, 1, &nHistSize, &fHistRange); As it says in the documentation describing the source arrays: Source arrays. They

Categories : Opencv

Instaliing opencv4tegra on ubuntu 12.04
Try the steps from jetsonhacks: #!/bin/sh # Get and install OpenCV for Tegra # Linux for Tegra (LT4) 21.1 and CUDA 6.5 *must* be installed on the Jetson before installation! wget http://developer.download.nvidia.com/embedded/OpenCV/L4T_21.1/libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb sudo dpkg -i libopencv4tegra-repo_l4t-r21_2.4.10.1_armhf.deb sudo apt-get update sudo apt-get install libopen

Categories : Opencv

How to calculate "Arctan" and "Pow" of IplImage?
You can use the "cartToPolar" function for your purpose. This function calculates the magnitude and angle of 2D vectors. magnitude(I)= sqrt(x(I)^2+y(I)^2), angle(I)= atan2(y(I), x(I))[ *180 / pi ] For example: IplImage dstXYImage; IplImage thetaImage; CartToPolar(dstXImage, dstYImage, dstXYImage, thetaImage, true);

Categories : Opencv

Issue in replacement of OpenCV function with ipp API
Why are you doing it? OpenCV functions already include IPP functions, when enabled with CMake. The goal of OpenCV is to keep the final code clean, but you are going in the opposite way. Avoid using IPP if the goal is to resize your image. Just stick with OpenCV's version. Simple, clean, efficient (thanks to IPP too)

Categories : Opencv

To improve Tesseract Accuracy
If you are working on number plate recognition, I would recommend you to train Tesseract exclusively for number plate characters as per your country, considering most countries have different fonts used for writing on the number plate. Pre-processing the image will not much of a difference unless you train Tesseract to recognize characters on number plate. USEFUL LINKS I would recommend you to

Categories : Opencv

Un-Distort raw images received from the Leap motion cameras
Ok, I have no leap camera to test all this, but this is how I understand the documentation: The calibration map does not hold offsets but full point positions. An entry says where the pixel has to be placed instead. Those values are mapped between 0 and 1, which means that you have to mutiply them by your real image width and height. What isnt explained explicitly is, how you pixel positions are

Categories : Opencv

how to find object distance from asus xtion pro camera opencv, ROS
In short: You can't. You're losing the depth information and any visible pixel in your camera image essentially transforms into a ray originating from your camera. So once you've got an object at pixel X, all you know is that the object somewhere intersects the vector cast based on this pixel and the camera's intrinsic/extrinsic parameters. You'll essentially need more information. One of the f

Categories : Opencv

Putting execution timing code into a function, OpenCV?
here's a little profiler magic ;) basically, it makes static counters per scope (think a pair of {}), which get initialized at module startup, and get read out at module release time. of course this takes time, too, so you don't want this inside some tight loop. // you might want to change the clock #define get_ticks cv::getTickCount #define get_freq cv::getTickFrequency double dt(int64 t) { re

Categories : Opencv

How to chose the optimal HSV values for InRange thresholding in OpenCV
If most of the image is more or less the same (for example most of it is a background) than you can do the following: Calculate median (M) of pixel values in image. Some people use mean instead but I prefer median for its robustness. Calculate median absolute deviation (MAD) of pixel values in image. Again I prefer it over standard deviation for its robustness. Everything that will fall in ran

Categories : Opencv




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.