2019-06-13 08:07:44 -0600 | received badge | ● Notable Question (source) |
2018-02-02 16:41:15 -0600 | received badge | ● Popular Question (source) |
2016-01-12 09:07:31 -0600 | received badge | ● Student (source) |
2015-06-17 09:25:09 -0600 | asked a question | Contours Centers pass to K-Means ?? Hi All, I am learning about opencv and used some functions. Now i am working on a project to detect the direction of people / object. For this purpose i need find the center of the object. After Background Subtraction the object comes in different part of contours and need to join them into ONE. I have read about K-Means Clustering but i am unable to pass the 2D vector float data. Would you please give me sample example code how to achieve my goal. /// Find contours findContours( canny_output, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0) ); I got the centers of all contours into MC and now need to pass to K-Means. I have learnt with the examples which is working but not sure about my real data. Looking forward your assistance in this regard. Shan |
2015-06-06 16:57:57 -0600 | received badge | ● Scholar (source) |
2015-06-06 16:57:43 -0600 | commented answer | get Center of nearby contours ?? Thanks alot for your kind help and suggestion. I have used std::vector<std::vector<cv::point> for sorting out labels. :) |
2015-06-06 11:39:04 -0600 | commented answer | get Center of nearby contours ?? Thanks for your reply. I do understand it but i have tried to store only the points with the same labels but should i need to erase the vector. would you please give me little code idea. |
2015-06-06 10:23:17 -0600 | asked a question | get Center of nearby contours ?? I am working on a project using OPENCV for some image processing. I been learning from examples, tutorials but I am new on opencv so I have a question. I have attached pictures (1) is original input (2) output for better understanding all of you. I have used dbscan algorithm for segmentation. My purpose is to detect multiple objects in an image and draw rectangle around them and give center point of each rectangle to track or know the position. But after some image processing filters , effects, Background subtraction, Findcontours ... i have found center of all contours. and pass to merged_contour_points vector. But it draw rectangle around all contours. I Hope you understand. Here are my codes; (more) |