Beginner in writing macro - grid definition
Hi all,
I'm a beginner in writing macros (more than beginner!)
I want to write a macro which 'replicates' the same measurement (correlation track) on many AOI. Basically, I want to create a grid on my picture, and repeat this track on every square of the grid.
I've recorded a macro while making the track on one AOI
I'm a beginner in writing macros (more than beginner!)
I want to write a macro which 'replicates' the same measurement (correlation track) on many AOI. Basically, I want to create a grid on my picture, and repeat this track on every square of the grid.
I've recorded a macro while making the track on one AOI
ipRect.Left = 259
ipRect.top = 497
ipRect.Right = 329
ipRect.bottom = 557
ret = IpAoiCreateBox(ipRect)
ret = IpTrackShow(TRACK_TABLE,TRACK_SHOW)
ret = IpTrackMeasSet(TM_ADD_CORREL_TRACK,0,0)
ret = IpSeqSet(SEQ_ACTIVEFRAME, 0)
End Sub
I'd like to tell the macro to 'move' the AOI and repeat from the step1.
Oh, and another thing: I want the macro to ask me at the beginning the size of the AOI I want (which should be a kind of mesh size of my grid)
I hope it's clear enough
Thank you for your support
I'd like to tell the macro to 'move' the AOI and repeat from the step1.
Oh, and another thing: I want the macro to ask me at the beginning the size of the AOI I want (which should be a kind of mesh size of my grid)
I hope it's clear enough
Thank you for your support
0
Answers
-
OPS! WRONG SECTION!!!! It's not Image Pro Premier, but Image Pro Plus... I can't move the question SORRY0
-
You can use IpStGetInt to prompt for AOI size (check macro help for examples of IpStGetInt).
Then you just make a loop along X and Y where you change ipRect coordinates. The loop should cover image width and height, which can be obtained from IPDOCINFO returned by IpDocGet (check help for examples on IpDocGet and IPDOCINFO).
Regards,
Yuri
0 -
unfortunately my problem is SO much bigger: I've never written a macro, so I don't know where to begin from.
I can code in Matlab, so I've perfectly understood the logic of the macro you're suggesting me. Although this, I've tried to write something in Image Pro Plus, but I've definitively failed...0 -
2017-02-06-121903
Bibiri --
If the challenge that you have for IMAGE-PRO PLUS is beyond your programming skills, my company (ALCES IMAGING AND AUTOMATION) and I can assist you.
Browse to
alces.us
for some company information.
My CONTACT INFORMATION is at the base of the FRONT PAGE.
I would post it here but I don't want it picked up by any AD BOTS.
-- Matt
0 -
I hope I can find the solution to my problem here0
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