Measure Increasing Diameter in Video File - Simulink

I am trying to design a Simulink Model to take a 1080p video feed and detect the increasing edge of a winding coil of steel.
Essentially the coil starts with a radius of this size: o and as more steel is wound, it increases to this size: O. so.... o ----> O
I am designing a system that uses edge detection in video processing to observe this process. I want my model to make the diameter length measurement every frame. When the target diameter is reached, the model is to ping a TCP/IP address production control system with the "cut" command. Attached is a picture of current Simulink Model.
I am having trouble instituting the measurement system. Does anyone have any advice as to how I can edit my model to output the current diameter's value?

Answers (1)

Something along these lines?
The interpreted ML function would check if the diameter is big enough and ping the tcpip commands

9 Comments

Great Thanks so much Sean. Also, is there a way for the current value that the blob analysis diameter block is outputting to be visualized? It would be an immense help for troubleshooting if there were feedback on the detected edge video output that could produce the diameter value and where on the blob it is measuring the diameter from. In the attached picture you can see that the camera angle is not 90 degrees. So therefore the vertical diameter of the blob is smaller than the horizontal diameter of the blob. Does this make sense? Would the major/minor axis length measurement feature be a more appropriate statistic of the blob analysis block?
Sure, split that signal and either send it to a scope so you can watch it while simulating or a To Workspace block so you can analyze it after. Or both!
These blocks are in the "Sinks" category under base Simulink.
That diameter is an equivalent diameter if the blob pixels were perfectly circular. To actually have it calculate a length through some combination of points, the axis lengths would be better.
You can also send your video signal to a video viewer so you can see it.
Sean. You are a genius. Thank you so much. Attached is my current model. As you can see I am trying to send my Blob Analysis to a Video Viewer in order to be able to visualize the blob. I want to see how accurately the blob resembles the growing ellipse of steel. This current configuration is definitely incorrect. Do you know how I can visualize the blob? Thanks again.
I don't think the model got attached. Also, do you have a few still frames that you could show?
as you can see from the model diagram, the blob analysis is being run on the edge detection video. that is the middle picture of the image above. the scope is then reading the blob analysis of that. i am trying to figure out some way to visualize which blobs are which. it is apparent that the blue line represents the growing major axis measurement. and it is fairly accurate. although it is off by 95 pixels. i'm guessing that's because it's starting offset by 95 pixels due to the yellow line? regardless the final blue line measurement is pretty good considering the video this is analyzing is only 320p.

Sign in to comment.

Asked:

on 28 Oct 2014

Commented:

on 29 Oct 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!