Extract x and y co-ordinates from a line profile
Hello,
May I know if there is an option to extract the (x,y) co-ordinates from a line profile on a calibrated image?
Thanks for any help,
Paulstar008
May I know if there is an option to extract the (x,y) co-ordinates from a line profile on a calibrated image?
Thanks for any help,
Paulstar008
0
Answers
-
Additional info: The line is created using Auto Trace Polyline tool under Measure tab in Image-Pro Premier V 9.20
-
2018-10-25-091034PaulStart008 --Can you provide an image that illustrates the information that you are looking for?Perhaps sketch it up on a piece of paper and photo or scan it and send it?Thanks.-- Matt0
-
Dear Matt,
Here is a copy of the image. The line profile is also visible.
Thanks
0 -
Hi Paulstar008
Take a look on this post.
http://forums.mediacy.com/discussion/comment/2311#Comment_2311
Thanks,
Nikita.0 -
Dear NikitaRG,
Thanks for your suggestion. The original co-ordinates of the image ranges from (0,0) to (990,740). When I performed the measurements using the above macro, I get strange values with co-ordinates up to (2014, 813), see below. I would also like to export the values to MS excel with x and y values in two different columns for further analysis.
Thanks,
Paulstar0080 -
HI Paulstar008,
If you want to print coordinates in 2 columns, use Matt's code (from the same topic):'Output the CURRENT BOUDARY POINT s = _ p.x.ToString("F2") & vbTab & _ p.y.ToString("F2") ThisApplication.Output.PrintMessage(s)
Then you can export the Output window to Excel.
Note, that the coordinates are in Pixels, that may explain 2014,813.
Yuri
0 -
2018-10-26-104110PaulStar008 --The information below may help also.All of these IMPORTS may not be needed but these are in the PROJECT / APP that includes this CODE so I am showing them below.You can replace the IMAGE WIDTH and IMAGE HEIGHT (in PIXELS) with the X COORDINATES and Y COORDINATES (in PIXELS) to get the CALIBRATED versions of the X COORDINATES and Y COORDINATES.I hope this information is helpful-- Matt-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-'Import REFERENCESImports MediaCy.Addins.Measurements
Imports MediaCy.Addins.Measurements.Gadgets
Imports MediaCy.Addins.Measurements.McMMData'Declare VARIABLESDim MyCalibrationUnits As String
Dim MyPixelSizeX As Double
Dim MyPixelSizeY As DoubleDim MyRoiArea As Double'Learn CALIBRATION INFORMATION
If (ThisApplication.ActiveImage.SpatialCalibration IsNot Nothing) _
Then
MyCalibrationUnits = _
ThisApplication.ActiveImage.SpatialCalibration.UnitAbbrev
MyPixelSizeX = _
ThisApplication.ActiveImage.SpatialCalibration.PixelSizeX
MyPixelSizeY = _
ThisApplication.ActiveImage.SpatialCalibration.PixelSizeY
Else
MyCalibrationUnits = _
"pix"
MyPixelSizeX = _
1
MyPixelSizeY = _
1
End If'Learn ROI AREA in CALIBRATED UNITSMyRoiArea = _
( ThisApplication.ActiveImage.Width * MyPixelSizeX ) * _
( ThisApplication.ActiveImage.Height * MyPixelSizeY )
0 -
Thank you Yuri and Matt for your kind support. As I am not that familiar with macros, perhaps you can provide a little bit more information on how I can implement the above.
Thanks,
PaulStar0080 -
2018-10-31-111239PaulStar008 --Writing a MACRO to EXTRACT and REPORT the DATA that you are looking for (as I understand the challenge) would take about 30 to 60 minutes for a basic routine that would handle 1 LINE in 1 IMAGE.This is a bit too big a project for me to tackle for the FORUM.MEDIA CYBERNETICS holds MACRO PROGRAMMING CLASSES for IMAGE-PRO a couple of times each year for a fee.ALCES IMAGING AND AUTOMATION provides MACRO PROGRAMMING SERVICES for IMAGE-PRO for a fee.I hope this information is helpful.-- Matt0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions