Plot extracted world coordinate of object on object
4 views (last 30 days)
Show older comments
Hello,
I have successfully developed a computer vision alrothim to detect segments of an object. To help, I have colored the two segments I am interested in.
I am having a challenge plotting the XY coordinate (shown left of image) of the detected color on the original image so that their location aligns. Can any one offer any suggestions or help? I will very much appreciate this. Thank you.
2 Comments
KALYAN ACHARJYA
on 17 Jul 2022
Hi Sam,
Are you wish to get the coordinates of the color segments (Red & Blue)?
Kalyan
Answers (1)
Krishna
on 7 Feb 2024
Edited: Krishna
on 7 Feb 2024
Hello Sam,
As far as I understand your question you need to plot the X Y coordinate you have found for different segments in the image using your computer vision algorithm. If you're using MATLAB to plot the XY coordinates of detected colour segments on an original image, you can follow these steps:
- Read the image using ‘imread’.
- Use ‘insertshape’ to mark the image of the detected coordinates.
- Use ‘imwirte’ or ’imshow’ to display the information.
Please go through the following documentations for more information on the function,
Now for troubleshooting alignment issues as you mentioned in your question,
- Confirm that the coordinate system used in your detection algorithm matches MATLAB's image coordinate system, where the top-left corner is (1,1).
- If you're using normalized coordinates or a different scale, convert them to pixel coordinates that match the original image's resolution.
- Check for any image preprocessing steps like padding, scaling, or rotations you might be using in your computer vision algorithm that could affect the alignment of the coordinates.
If you're working with a sequence of images or a video, apply this process to each frame. If your algorithm outputs bounding boxes, you can use ‘rectangle’ in MATLAB to draw the boxes on the image.
Hope this helps.
0 Comments
See Also
Categories
Find more on Image Processing and Computer Vision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!