Hi, guys,
I'm looking for a way to highlight striking or high-contrast dots on a black and white or color image (webcam) live. The marker should not jump around, so stay in one place.
So far I only found the "Canny" effect.
Do any of you know an effective solution to my problem (in Python)?
Thank you in advance!
Best regards Windowio
↧
How to find prominent points and mark in the picture?
↧
How to seprate lists in an image?

**How do I separate these columns vertically?**
I want my OCR to read this image column by column.
**How do I separate these columns vertically?**
I want my OCR to read this image column by column.
↧
↧
Stuck b/w joint probablity and conditional probablity
(Please read the problem patiently,I tried to express my problem as clear ")
My brain is confusing with 'joint probabity' and 'conditional probablity'.Let us suppose two events A and B;
This is what I found from websites like quora
Conditional Probablity
p(A|B)=probability of occurrence of event A after B;
Joint probability
p(A intersection B)=probability that both events are going to occur;
But Wikipedia says about "joint probability" that
" In the study of probability, given at least two random variables X, Y, ..., that are defined on a probability space, the joint probability distribution for X, Y, ... is a probability distribution that gives the probability that each of X, Y, ... falls in any particular range or discrete set of values specified for that variable"
means this is meant to predict range of probability distribution
question
so which one of two knowledge are correct and how joint probability is related with conditional probability(by definition of wikipidea)?
↧
How to improve threshold image result OpenCV Java Android
Iam using OpenCVAndroid for thresholding images following is code and result

Following methods from OpenCV used
Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), selectedImage);
Mat imageMat = new Mat();
Utils.bitmapToMat(bitmap, imageMat);
Imgproc.cvtColor(imageMat, imageMat, Imgproc.COLOR_BGR2GRAY);
Imgproc.threshold(imageMat, imageMat, 120, 255,Imgproc.THRESH_BINARY);
Utils.matToBitmap(imageMat, bitmap);
got following result

How can i improve my result, in order to read the barcode and get location of lines running across the pouch in the image??
↧
Training HOG and SVM to work with OpenCV
I'm trying to find a person sitting down so I need to train my own HOG and SVM. After reading how HOG and SVM's work I really can't find a simple implementation for creating my own custom HOG and SVM. I get that I need to crop positive and negative sample images to a specific size and places them in respective folders. This program (https://github.com/opencv/opencv/blob/master/samples/cpp/train_HOG.cpp) train_HOG.cpp, from OpenCV, looks like a clean implementation but I'm not sure where to start.
Can I install OpenCV on my Windows machine and compile it with Visual Studio?
After it runs is the output a .XML file?
I'm using OpenCV and Python on a Raspberry Pi. I've been able to use other trained .XML files by placing them in the Data folder where the default people detector is.
↧
↧
Ideal algorithm for real-time helipad tracking?
Dear all,
I've been testing numerous methods for helipad tracking (H in a circle) but none seems to be ideal for the task.
Appreciate anyone who could enlighten me on a reliable approach for tracking such an object, or any way to improve my current ORB parameters.
What I tried:
**1.** Colour + Contour Finding: Works most of the time with a downward facing camera but prone to environmental noise giving false contour matches (finding a shape with 12 edges), not exactly skew invariant since some edges disappears at an angle.
**2.** ORB/SIFT: Too many false positive matches due to the generic shape of the landing pad.
MIN_MATCH_COUNT = 10
img1 = cv2.imread('helipad.jpg',0)
img2 = gray
orb = cv2.ORB_create()
kp1, des1 = orb.detectAndCompute(img1,None)
kp2, des2 = orb.detectAndCompute(img2,None)
bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True)
matches = bf.match(des1,des2)
dmatches = sorted(matches, key = lambda x:x.distance)
src_pts = np.float32([kp1[m.queryIdx].pt for m in dmatches]).reshape(-1,1,2)
dst_pts = np.float32([kp2[m.trainIdx].pt for m in dmatches]).reshape(-1,1,2)
M, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC,5.0)
h,w = img1.shape[:2]
pts = np.float32([ [0,0],[0,h-1],[w-1,h-1],[w-1,0] ]).reshape(-1,1,2)
dst = cv2.perspectiveTransform(pts,M)
img2 = cv2.polylines(img2, [np.int32(dst)], True, (0,0,255), 1, cv2.LINE_AA)
cv2.imshow("Tracker", img2)
res = cv2.drawMatches(img1, kp1, img2, kp2, dmatches[:20],None,flags=2)
cv2.imshow("Match", res)
↧
How are HSV values interpreted in Python?

In OpenCV-Python, I understand Hue is measured in angles. For OpenCV and HSV, is Hue in radians or degrees?
Also, what are the minimum and maximum values for Saturation and Value in HSV?
Does the Min for Saturation correspond to the center core of the HSV cylinder, or is that the Max Saturation?
Does the Min Value correspond to the top of the HSV cylinder, or the black bottom?
What are the HSV values for cyan which have BGR of (255,255,0)?
I'd greatly appreciate any help I can get for my understanding of OpenCV HSV.
↧
3D reconstruction of Rubik's cube. Did you try it?
The task seems elementary at first glance, but try and it turns out to be tricky. Meanwhile this is just a geometric puzzle and a perfect application for various OpenCV methods. Enjoy. I don't ask about solving it or color detection. It is regarded just as a box.As computer vision practitioners have already guessed, the pictures presented are the best. Just turn it 40 degrees and the perfect result goes bust. Detecting contours works better, but it is rather time-consuming. It produces many duplicates. I tried Canny only. You see that many squares are lost because their contours were rejected. If I replace
approx.size()==4&&fabs(contourArea(Mat(approx)))>100&&isContourConvex(Mat(approx)))
----------------------------------------
by
fabs(contourArea(Mat(approx)))> 100)
------------------------------------
they appear and the central knot may be detected.
↧
Rectangle area, Am i doing it all right?
Hello again,
Actually i am comparing two images, to find new object introduced into second image, which is not there in the first image. I have got the working code here, as an answer, when i posted my question; But clearing the concepts, then programming by own style, is what i believe.
#include
#include
#include
#include
#include
using namespace cv;
using namespace std;
int main(void)
{
// Reading color images ( including alpha channel )into Mat
Mat first_rgb = imread("./road.jpg", IMREAD_UNCHANGED);
Mat second_rgb = imread("./road_changed.jpg", IMREAD_UNCHANGED);
// Check for invalid input
if( (! first_rgb.data) || (! second_rgb.data) )
{
cout << "Could not open or find color image or images...\n";
return -1;
}
// Resizing both images, so that number of pixels become same for finding negation / difference
resize(second_rgb, second_rgb, first_rgb.size());
// Converting both images to Gray and load them into new matrices
Mat first_gray, second_gray;
cvtColor(first_rgb, first_gray, COLOR_RGB2GRAY);
cvtColor(second_rgb, second_gray, COLOR_RGB2GRAY);
// Now Get absolute difference into matrix
Mat diff;
absdiff(first_gray, second_gray, diff);
// binarizing the difference, making all zero keeping non-zero / difference intact.
Mat bin = diff > 70;
// Find non-black points
vector points;
findNonZero(bin, points);
// Get bounding rect
Rect box = boundingRect(points);
float area = box.width * box.height;
cout<<"area in pixels = "<
↧
↧
find object size in pixels
I'm new to opencv, i use the c++ package. I used the code in the tutorial to detect an known object in the picture. Now I need to find the size of the object in pixels. I just need the number of pixels of his height and width in the pic (not the actual size). I couldn't find something that will help me.. is there a way to do it?
↧
OpenCV3.1 VS2010 - Linker Error
Hello,
I have to use vs2010 and opencv3.1 for testing purpose.
I cmaked a project and build it with my visual studio.
Now I'd like to write a short program to test it.
Sadly it does not work when creating.
this is my code:
Mat image;
image = imread(argv[1], IMREAD_COLOR); // Read the file
if(! image.data ) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl ;
return -1;
}
namedWindow( "Display window", WINDOW_AUTOSIZE ); // Create a window for display.
imshow( "Display window", image ); // Show our image inside it.
waitKey(0); // Wait for a keystroke in the window
return 0;
header:
#include "stdafx.h" #include #include #include #include #include #include
And the error:
opencv-test2018.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""class cv::Mat __cdecl cv::imread(class cv::String const &,int)" (?imread@cv@@YA?AVMat@1@AEBVString@1@H@Z)
C:\Users\Visual Studio 2010\Projects\opencv-test2018\x64\Release\opencv-test2018.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.'
I added the linker setting to:
C:\OpenCV-3-1-0\opencv\build\install\x64\vc10\lib
there are all the .lib inside. I added the following
opencv_calib3d310.lib
opencv_core310.lib
opencv_highgui310.lib
opencv_imgproc310.lib
opencv_video310.lib
opencv_ml310.lib
which are all located inside. I have set my VS to **x64 Release**
Any idea why i can not create the project?
↧
Suggestion: drop VTK for VIZ and use simple OpenGL
Hello there,
would it be possible to remove the whole VTK dependency from OpenCV and create a simple OpenGL based basic vizualization instead that comes per default with the opencv package?
Reasons:
1. Not having the balast of this VTK library. Compiling it is not fun. Also when someone just wants to vizualize sth quickly it is not quickly set up.
2. VTK pointcloud renderer is slow. To be fair, thats my experience when using it with PCL - it took about 60ms on a high end desktop pc until a dense pointcloud with 1920*1200 points (about 2.3 Million 3d points) was rendered. Just for uploading and rendering it. This is so slow.
3. You can create really fast renderers that directly upload your cv::Mat 3d vertices an opengl vertex buffer array. I have written a very simple prototype that used simple OpenGL code and renders it very fast.
Here i prepared a desktop recording of a scene with 1920*1200 image resolution. In this video i do the following:
Reading 1920*1200 stereo images from disk
Estimating a depthmap from those images using block matching
Calculating 3d vertices from the depth map
uploading to a pointcloud viewer that i have written
Here the video: https://www.youtube.com/watch?v=-Bw_m85EAto&feature=youtu.be
If someone wants to know (at the begining i used a blocksize of 19 and at the end of the video i changed it interactively to 47 - with 19 blocksize it takes 50ms and with 47 blocksize the whole pipeline takes 80ms)
What users get:
- high performance rendering of point cloud sequences for example from a stereo block matching result
- no vtk dependency and viz should then come per default in opencv
Does OpenCV use VTK else where? I mean is it such a useful library for opencv? In my opinion, when someone wants to use VTK for vizualization, then VTK should be a dependency of the end user project but not of opencv library.
This is not a question, but rather a discussion. What do you thing? I thought maybe for the coming opencv 4.0 release this would be a nice idea.
↧
Static linking help needed when including the viz module (VTK)
Hey all!
I'm having an issue I've been fighting with all weekend. I'm trying to build a fairly simple example which uses the viz module in C++. I've built OpenCV 3.4 and OpenCV-contrib along with VTK 8.1.0 as static libs and all seems to be well there. But after adding all the libs and appropriate includes I get 19 build errors I can't seem to resolve and they all seem to be related to the opengl libraries within vtk.
opencv_viz340d.lib(opencv_viz_pch.obj) : error LNK2019: unresolved external symbol "void __cdecl vtkRenderingOpenGL2_AutoInit_Construct(void)" (?vtkRenderingOpenGL2_AutoInit_Construct@@YAXXZ) referenced in function "public: __thiscall vtkRenderingCore_AutoInit::vtkRenderingCore_AutoInit(void)" (??0vtkRenderingCore_AutoInit@@QAE@XZ)
opencv_viz340d.lib(opencv_viz_pch.obj) : error LNK2019: unresolved external symbol "void __cdecl vtkRenderingOpenGL2_AutoInit_Destruct(void)" (?vtkRenderingOpenGL2_AutoInit_Destruct@@YAXXZ) referenced in function "public: __thiscall vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit(void)" (??1vtkRenderingCore_AutoInit@@QAE@XZ)
vtkRenderingGL2PSOpenGL2-8.1.lib(vtkOpenGLGL2PSHelperImpl.obj) : error LNK2019: unresolved external symbol "public: virtual void __thiscall vtkOpenGLGL2PSHelper::PrintSelf(class std::basic_ostream>&,class vtkIndent)" (?PrintSelf@vtkOpenGLGL2PSHelper@@UAEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VvtkIndent@@@Z) referenced in function "public: virtual void __thiscall vtkOpenGLGL2PSHelperImpl::PrintSelf(class std::basic_ostream>&,class vtkIndent)" (?PrintSelf@vtkOpenGLGL2PSHelperImpl@@UAEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VvtkIndent@@@Z)
vtkRenderingGL2PSOpenGL2-8.1.lib(vtkOpenGLGL2PSHelperImpl.obj) : error LNK2019: unresolved external symbol "protected: __thiscall vtkOpenGLGL2PSHelper::vtkOpenGLGL2PSHelper(void)" (??0vtkOpenGLGL2PSHelper@@IAE@XZ) referenced in function "protected: __thiscall vtkOpenGLGL2PSHelperImpl::vtkOpenGLGL2PSHelperImpl(void)" (??0vtkOpenGLGL2PSHelperImpl@@IAE@XZ)
vtkRenderingGL2PSOpenGL2-8.1.lib(vtkOpenGLGL2PSHelperImpl.obj) : error LNK2019: unresolved external symbol "protected: virtual __thiscall vtkOpenGLGL2PSHelper::~vtkOpenGLGL2PSHelper(void)" (??vtkOpenGLGL2PSHelper@@MAE@XZ) referenced in function "protected: virtual __thiscall vtkOpenGLGL2PSHelperImpl::~vtkOpenGLGL2PSHelperImpl(void)" (??1vtkOpenGLGL2PSHelperImpl@@MAE@XZ)
vtkRenderingGL2PSOpenGL2-8.1.lib(vtkOpenGLGL2PSHelperImpl.obj) : error LNK2019: unresolved external symbol "public: unsigned int __thiscall vtkTransformFeedback::GetBytesPerVertex(void)const " (?GetBytesPerVertex@vtkTransformFeedback@@QBEIXZ) referenced in function "public: virtual void __thiscall vtkOpenGLGL2PSHelperImpl::ProcessTransformFeedback(class vtkTransformFeedback *,class vtkRenderer *,float * const)" (?ProcessTransformFeedback@vtkOpenGLGL2PSHelperImpl@@UAEXPAVvtkTransformFeedback@@PAVvtkRenderer@@QAM@Z)
vtkRenderingGL2PSOpenGL2-8.1.lib(vtkOpenGLGL2PSHelperImpl.obj) : error LNK2019: unresolved external symbol "public: unsigned int __thiscall vtkTransformFeedback::GetBufferSize(void)const " (?GetBufferSize@vtkTransformFeedback@@QBEIXZ) referenced in function "public: virtual void __thiscall vtkOpenGLGL2PSHelperImpl::ProcessTransformFeedback(class vtkTransformFeedback *,class vtkRenderer *,float * const)" (?ProcessTransformFeedback@vtkOpenGLGL2PSHelperImpl@@UAEXPAVvtkTransformFeedback@@PAVvtkRenderer@@QAM@Z)
vtkRenderingGL2PSOpenGL2-8.1.lib(vtkOpenGLGL2PSHelperImpl.obj) : error LNK2019: unresolved external symbol __imp__glGetDoublev@8 referenced in function "protected: static void __cdecl vtkOpenGLGL2PSHelperImpl::GetTransformParameters(class vtkRenderer *,class vtkMatrix4x4 *,class vtkMatrix4x4 *,double * const,double * const,double * const)" (?GetTransformParameters@vtkOpenGLGL2PSHelperImpl@@KAXPAVvtkRenderer@@PAVvtkMatrix4x4@@1QAN22@Z)
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function _gl2psDrawImageMap
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function _gl2psDrawImageMap
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glFeedbackBuffer@12 referenced in function _gl2psBeginPage
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glGetBooleanv@8 referenced in function _gl2psDrawPixels
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glGetFloatv@8 referenced in function _gl2psBeginPage
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glGetIntegerv@8 referenced in function _gl2psBeginPage
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glIsEnabled@4 referenced in function _gl2psBeginPage
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glPassThrough@4 referenced in function _gl2psDrawPixels
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glRenderMode@4 referenced in function _gl2psBeginPage
vtkgl2ps-8.1.lib(gl2ps.obj) : error LNK2019: unresolved external symbol __imp__glVertex3f@12 referenced in function _gl2psDrawImageMap
I don't quite understand the error. I've looked at the VTK code and clearly there is a constructor defined as well as other methods mentioned, and the vtkRenderingOpenGL2-8.1.lib is referenced in the application (I referenced all libs). Any help would be appreciated!
↧
↧
can i get the code for feature extraction from an image python
its for sign language recognition
↧
Usage of ROS and Stereolab ZED
Hi,
I am currently working on a project involving a pair of stereo cameras. These stereo cameras
will be placed in the environment. These cameras will be used to obtain a 3D map (might use Octomap?) of the environment ( for obstacle avoidance ) and then extended to path planning later.
I have seen a few commercial stereo cameras that might work with ROS. I rejected MIcrosoft Kinect as it
has a very short range (0.8 - 4.5 metres) but I came across Stereo Labs ZED as seen [here](http://wiki.ros.org/zed-ros-wrapper) on the ROS wiki page.
**My Question:**
Does anyone have experience using **StereoLabs ZED with ROS** ? Is it really as good as it is claims ( depth maps **upto 20m** ?)
I would be grateful if anyone can provide an instance of using ZED with ROS.
Thanks!
↧
Handling both 16bit and 8bit images in the same program.
Hello, here's my problem. I'm writing a program that shall handle both 8bit and 16 bit data. The problem is that every procedure to modify the data must use the template of the proper class. For example:
img = cv::imread(path, CV_LOAD_IMAGE_ANYDEPTH);
std::for_each(img.begin>(), img.end>(), cleanPixel);
? above being ushort in the case of 16bit and uchar in the case of 8bit data. I know that I can check the depth of the image using the method img.depth(), and check the equality with either CV_16U or CV_8U. Is that the only way? I was also thinking to use some preprocessor constant, and maybe compile two different version of the program (one only for 8bit images and one only for 16bit images).
Thanks in advance for your help.
↧
how to detect if xfeatures2d is installed
Hej all,
How do I, in the CMakeLists.txt figure out if the current install of openCV has `xfeatures2D` installed ?
Can I do something along the lines of :
find_package(OpenCV REQUIRED)
if(OPENCV_XFEATURES2D)
do stuf
endif
↧
↧
Get coordinates from the detected object using haar cascade (c++)
Im working my image processing in c++, and Im using the method of haar cascade. And I got the object detected, but my problem is, the detected object is stored in Vector. I do understand to get a coordinate using find contours, but if the object is in Mat and it is 8 bit. But I dont understand how to convert Vector to Mat. Or if you guys have another way to get the coordinate. I hope that it is clear enough. Thank you
↧
Why i am getting this error while building opencv3.4 with extra modules..Thanks
*emphasized text*
↧
Find conspicuous points in a 2D image
I'm looking for a way to highlight (Track-)points in a webcam image (live).
My attempt to scan the image for unusually bright or dark pixels works in theory, but it can't be applied to real images. So my question is whether it is easy to find conspicuous points with OpenCV and if so, how.
(The algorithm should always mark the same points on the paralyzed image.)
Also, I would like to compare the found track points later with track points on other pictures! Maybe one of you guys has an idea!?
----------
Many thanks in advance:)
↧