Prev: how to transmit a function_in data to output with the same variable
Next: estimating Laplace tranfer function that matches data
From: Walter Roberson on 16 Jun 2010 21:06 Siddharth Magazine wrote: > I really need someone's help on this. I am trying to acquire an image > which has two black points in it. So, i mean i need some matlab codes > which can help me to acquire the image automatically by identifying the > two black points, and then find the distance automatically with a line > drawn between the two black points. I am stuck in this automated > process. Can't really think about any codes which can do that in Matlab? Threshold the image with a low value. Take the logical negation of the image. bwlabel that. regionprops to get the centroids. Take a euclidean distance between the coordinates. However, unless the points are truly points (single pixels) you need to define exactly what you mean by the "distance between" the points. Are you looking for centroid to centroid distances or for closest-pixel to closest-pixel distance? |