Is it possible to select two points automatically from an image?
Mostra commenti meno recenti
I need to select only two points(coordinates) automatically marked with red crosses in the image titled "InkedCscan_Depth_1.3455". If this is not possible I would like to extract the lines as we generally see in plots (.fig format)
The angle in the image shows the orientation of the lines I want to inspect
I need help please
Risposte (2)
Walter Roberson
il 3 Feb 2023
0 voti
Information can only be automatically extracted if there is a programmable rule that describes how to distinguish the information from the rest of the data.
I see nothing in that image that would permit you to pick those particular points as being distinguished. I have no idea how you choose them.
The image appears to be similar to texture of a fabric. If you are trying to detect the "threads" then you might possibly be able to use houghlines . It would not astonish me if you had to "invert" the image so that the "thread" positions were bright and the holes were dark.
2 Commenti
Atik Amin
il 3 Feb 2023
Walter Roberson
il 3 Feb 2023
You might want to start with rgb2gray followed by imbinarize with 'ForegroundPolarity','dark' in order to produce the black and white image.
Image Analyst
il 4 Feb 2023
0 voti
Explain why those two particular lines were picked? I see nothing special about them or any different than any other point in the image. You might look at radon to get a projection of your image at all angles to look for the angle where most of the lines are along.
10 Commenti
Atik Amin
il 4 Feb 2023
Image Analyst
il 4 Feb 2023
Sounds like you didn't even try my suggestion. Probably you require something super simple.
How about if you just use something like improfile to define the angle manually? Why does it have to be automatic? You might spend less time manually drawing lines on your images than it takes to you write an automatical algorithm that is robust.
Does "What I need is to write a function or code that can automatically..." mean that it's your homework and we're not allowed to write it for you?
I'm attaching another demo where I get the angles in the image automatically. I get a "theta" image where every pixel is the local angle. Then you can take the average over the whole image if you want the global average.
Atik Amin
il 4 Feb 2023
Walter Roberson
il 4 Feb 2023
What guidelines did you use to manually select those two particular points ? When Image Analyst or I look at your image, we do not notice anything special about those two particular points.
Atik Amin
il 4 Feb 2023
Image Analyst
il 5 Feb 2023
I assume you got it working.
If not, attach the original, not pseudocolored, non-annotated gray scale image and I'll work a few minutes on it if I get time.
Atik Amin
il 5 Feb 2023
Atik Amin
il 5 Feb 2023
Image Analyst
il 5 Feb 2023
Sorry, but no it's not. You have not attached any additional images, only the one in the original post up top. The original image will not be a screenshot. It will not have tick marks, axes labels, red X's, theta, etc. like the image you attached has. It will be just a plain gray scale image.
Atik Amin
il 5 Feb 2023
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!