Azzera filtri
Azzera filtri

Axis of a graph

2 visualizzazioni (ultimi 30 giorni)
HASNAIN
HASNAIN il 28 Giu 2012
Hi all,
So basically I have the following image :
Each dot going positive in the x axis (right)is time and is 0.04 seconds. Each dot going positive in the y axis (up) is voltage and is 0.1mV.
The idea is that the user is presented with a big graphical paper and he is given the option to crop the image to whatever dimensions he wants to. An example of which is shown above.
What i want to do is be able to some how count the number of dots that exist horizontally and vertically. So in this example, i manually counted that there are : 62 dots horizontally and 6 lines vertically.
So i want the computer to be able to do the above and also calibrate it. I.E 1 dot horizontally = 0.04 seconds and one dot vertically is 0.1mV. This is so that i can use these x and y values as the axis for a waveform that i have segmented.
The end result i want matlab to do is to find x values ranging from 0 to 2.48 seconds (62*0.04) and y values to be 0.6 mV.
I did have a go at thresholding the image and this is what i got up to :
Many thanks!!

Risposte (1)

Image Analyst
Image Analyst il 29 Giu 2012
Looks to me like your image does not have enough resolution or contrast to do reliable blob counting. I'd fix the image capture problem first and avoid a big headache with post processing.
Another question I have is whether the rows and columns of your dots are guaranteed to be aligned with the image rows and columns, or can you dot pattern be tilted?
  3 Commenti
Image Analyst
Image Analyst il 29 Giu 2012
Try to use hough to identify the lines and the angles. Then use imrotate to align the image. Use bwareaopen to remove big items, like the axis, or small items like noise. Then just count what's left with standard blob counting mathods, like BlobsDemo, in my File Exchange shows you how to do.
HASNAIN
HASNAIN il 29 Giu 2012
Thanks for the reply. Iam a beginner to IPT, could you point me to an example for the hough transform please? Thanks!

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by