detection and counting inside a ROI using simulink
이전 댓글 표시
Hello, I am very new to Matlab and am trying to figure out how to detect a feature in a region of interest and count that feature. I have looked through the simulink examples and there are pieces of them that would work for this but I don't understand some of the detailed settings or the filtering that is needed to perform the task.
This is the workflow that I have come up with so far: 1) load video (its full color) 2) perform edge detection or some filtering to show the shapes in each frame 3) establish an ROI in the filtered image (can't figure this part out) 4) If zero intensity area is greater than say roughly 30 by 30 pixels then count (working on this part) 5) Display video, overlay ROI, overlay edge detection, overlay count.
I am not looking for someone to do this for me b/c it defeats the purpose but I welcome hints and some explanation of the logic process or clarity on the tools to be used.
Thanks so much.
답변 (1개)
Madhavan V K
2013년 11월 27일
0 개 추천
Hi Kean,
I am sorry that I would not be able to help you with detecting the ties. But once you have the thresholded image containing just the ties, I could help you with the overlaying part. Here it is, I assume that you have the thresholded binary image (lets call it BW) containing the ties. You would have to take the perimeter of the objects (ties) present in BW.
perimeter_ties = bwperim(BW)
Once you have obtained the perimeter of the objects, you could overlay it to any image of your choice. You could use, imoverlay function written by Steven L. Eddins. Here is the link http://www.mathworks.fr/matlabcentral/fileexchange/10502-image-overlay Download the file.
This function makes the overlay extremely simple, all you would have to do is this,
overlayed_image = imoverlay(image_of_your_choice, perimeter_ties, [0 1 0]);
From your question, I understand that you wanted to establish ROI just for the purpose of overlaying. By using imoverlay, I reckon you would no more have the need to establish ROIs.
Hope this helps, Cheers, M.
카테고리
도움말 센터 및 File Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!