2014-12-03 01:24:53 -0600 | asked a question | How to recognize the image that have a circle ? Hi everyone, After using InrangeS() function to seperate the green area from an image, I get a binary image contain white and black area. In white area, I don't know how to recognize that they're not circle or they're circle. I'm very grateful if everyone help me to solve this problem. I'll enclose the image I get after using Hough transform for everyone :) Thanks a lotC:\fakepath\image.png |
2014-09-14 06:12:17 -0600 | asked a question | Smoothing image after using Inrange() function Hi everybody ! I used Inrange() function to detect tennis ball from webcam (this ball is green), after I used this function I got an binary image that is very rough. Here is my code : void morphOps(Mat &thresh) { void main() { VideoCapture capture(0); Mat src,dst,hsv; int red,grn,blu,red1,grn1,blu1 =0; namedWindow("Window"); namedWindow("Window1"); createTrackbar("red","Window",&red,255); createTrackbar("green","Window",&grn,255); createTrackbar("blue","Window",&blu,255); createTrackbar("red1","Window1",&red1,255); createTrackbar("green1","Window1",&grn1,255); createTrackbar("blue1","Window1",&blu1,255); This is Input image after transforming to HSV color C:\fakepath\input.png and the result C:\fakepath\clutter.png Can everyone help me to filter and smooth this image ? And finally there is only this ball on black background. This result is created after I choose the argument for Scalar is : lower(41,44,49) upper(91,255,255) ! Have a great day !! |
2014-09-13 11:42:36 -0600 | commented answer | How to create trackbar sorry this is my mother language :) It means the image after finding out right circle |
2014-09-13 11:07:55 -0600 | commented answer | How to create trackbar I think I must use the trackbar change event to solve this problem but I don't know how to use this trackbar event. Can you help me about this problem ? Have a great day |
2014-09-13 11:05:30 -0600 | commented answer | How to create trackbar @berak I used trackbar to find out the suitable argument for Houghcircle function and then draw right circle cover my object, but everytime I change value of trackbar then I can't change the circle was drew in the previous time. Here is my code : createTrackbar("min_dist_px","Window",&min_dist_px,255); createTrackbar("canny_threshold","Window",&canny_threshold,255); createTrackbar("acc_threshold","Window",&acc_threshold,255); createTrackbar("min_radius","Window",&min_radius,255); createTrackbar("max_dist_px","Window",&max_radius,255); |
2014-09-13 10:32:11 -0600 | commented answer | I can't paint the circle into image after using Hough transform :( @FooBar I attached this image in my answer. |
2014-09-13 04:54:56 -0600 | commented answer | How to create trackbar @berak thank you |
2014-09-13 03:52:32 -0600 | asked a question | How to create trackbar Hi everybody ! I want to create a trackbar to change the value of argument in inRange() function. I realize that everytime I change Scalar in this function and debug, it takes many times. I want to create a trackbar to change Scalar when I'm debugging . Can everyone help me about this problem ? Thanks very much |
2014-09-12 11:15:24 -0600 | answered a question | I can't paint the circle into image after using Hough transform :( @FooBar I got a good result when I used your code, but when I used webcam to track the tennis ball, I got a bad result. There were many wrong circle drew arround this ball but no right circle drew cover this ball. Here is my code : capture >> col; cvtColor(col.clone(),src,CV_BGR2GRAY); equalizeHist(src,src); GaussianBlur( src, src, Size(9, 9), 2, 2 ); if(src.empty()) { cout<< "can't load file from webcam" <<endl; }<="" p=""> Can you help me about this problem ? I will attach the bad result I got when I run my program at here C:\fakepath\Untitled2.png The original Image C:\fakepath\ball.jpg Have a great day ! |
2014-09-12 08:22:35 -0600 | asked a question | I can't detect and draw the circle cover the tennis ball using webcam Hi everybody ! I used webcam to detect and draw the circle cover the ball that was got from webcam using Hough transform, but I couldn't draw right circle cover this ball and there were many wrong circles were painted. Here is my code : VideoCapture capture(0); Mat src,col; while(true) { capture >> col; cvtColor(col.clone(),src,CV_BGR2GRAY); GaussianBlur( src, src, Size(9, 9), 2, 2 ); if(src.empty()) { cout<< "can't load file from webcam" <<endl; }<="" p=""> Can everyone help me about this problem ? I will attach the error window that contain many wrong circles I got when I debug at here C:\fakepath\Untitled2.png Have a great day ! |
2014-09-11 00:15:21 -0600 | commented answer | I can't paint the circle into image after using Hough transform :( I want to write value of "radius" and "center" in Window but I get a mistake that I don't know why. Here is my code : cout <<"The radius of circle" << radius << endl; cout <<"The center of circle" << center <<endl; Can you help me ? @FooBar |
2014-09-10 23:36:17 -0600 | commented answer | I can't paint the circle into image after using Hough transform :( @FooBar thanks very much...but can you indicate me how to recognize "canny_threshold" and "acc threshold" ? I think maximum value of threshold is 255 |
2014-09-10 11:26:39 -0600 | commented question | I can't paint the circle into image after using Hough transform :( Those params are (0,0) because I don't know the radius of ball, so I put (0,0) into those params to search automatically all circles in image |
2014-09-10 11:00:32 -0600 | commented question | Find Contour thanks everyone so much |
2014-09-10 10:56:22 -0600 | asked a question | I can't paint the circle into image after using Hough transform :( Hi everybody ! I used Hough transform to detect circle and then I will paint the circle into my input image ( tennis ball ) depend on those parameter that Hough issued ( center,radius ). Here is my code : The result I received after running my program was many red circles that were painted on the input image but not the circle I need. I need the circle cover my ball in this image. Can everyone help me about this problem ? I will attach this image at here C:\fakepath\banhtennis.jpg Thanks very much ^^ |
2014-09-09 11:17:17 -0600 | asked a question | Find Contour Hi Everybody ! I used the function cvFindContours() to find contour of my image. Here is my code : int main() { IplImage *src = cvLoadImage("meo.jpg"); CvMemStorage *storage = cvCreateMemStorage(0); cvMemStorageAlloc(storage,100); CvSeq *firstcontour = NULL; cvFindContours(src,storage,&firstcontour,sizeof(CvChain),CV_RETR_LIST,CV_CHAIN_APPROX_SIMPLE); cvShowImage("Anh Goc",src); } When I debug, my program will terminate. Can everyone help me about this problem ? I don't know why ! I will attach the image that I used in this code. Thanks a lotC:\fakepath\meo.jpg |
2014-09-05 05:04:21 -0600 | commented answer | How to transfer Image from webcam to gray image ? thank you ! Have a great day |
2014-09-05 04:18:36 -0600 | commented answer | How to transfer Image from webcam to gray image ? @StevenPuttemans Thanks so much :D but I still can't know why my program didn't run. I think " IplImage " is like with " Mat " . Can you tell me about this problem ? |
2014-09-05 03:24:53 -0600 | commented question | How to transfer Image from webcam to gray image ? @jamesnzt I tried following your method but this program still suspended. When I debug, it appears the notification : Unhandled exception at 0x76b12eec in OpenCV3.exe: Microsoft C++ exception: cv::Exception at memory location 0x0062f94c.. Can you help me ? Thanks so much :D |
2014-09-04 22:41:31 -0600 | commented question | How to transfer Image from webcam to gray image ? @StevenPuttemans I added line " char c = cvWaitKey(33) " but my program still suspend. I don't know why ? |
2014-09-04 08:48:22 -0600 | asked a question | How to transfer Image from webcam to gray image ? Hi everybody1 I obtain an image from my webcam and then transfer it to a gray image to process. Here is my code: When I compile my program it's no error but when I Run this program then It will terminate. I don't no Why but I think the error happen at line " cvCvtColor(src1,src,CV_BGR2GRAY) " because if I delete this line then I can obtain image from webcam normally. Everyone can help me correct this error ! Have a great day :D |
2014-08-29 11:25:22 -0600 | received badge | ● Editor (source) |
2014-08-29 11:23:28 -0600 | asked a question | How to regconize tennis ball by Webcam Logitech Hi everybody, I'm working with my thesis about Image Processing. I don't know how to regconize tennis ball by Webcam. There are 2 problem i must handle : color and shape. This ball is green and circle. How can I regconize 2 features of this ball ? Give me some methods or some algorithm to handle these problems ! Thanks Everyone so much. Have a great day :D |