|
-
May 31st, 2005, 04:12 AM
#1
Thread Starter
New Member
Re: Image Pro Plus macro. PLEASE HELP!
it can indeed record macros. what i want to do is add on one last bit to a recorded macro. i recorded a macro to process an image to show up defects on a fibre-optic plate, now i want to count how many pixels are in 3 different ranges of brightness: giving me a number representing low, med, and high shear in the fibre-optic.
below is the crucial bit of my code. i think there is a prob with the array...
i don't think i'm declaring it properly
Dim actdoc(200, 200) As Integer
Dim Reg As RECT
Dim Reg.Left = xpixel
Dim Reg.Right = xpixel+199
Dim Reg.bottom = ypixel
Dim Reg.top = ypixel+199
ret=IpDocGetArea(DOCSEL_ACTIVE,Reg,actdoc(i, j),0)
For xpixel = xstart To xstart+199
'gets the total of the pixels in the x column of sub area
For ypixel = ystart To ystart+199
subtotal=subtotal+actdoc(xpixel,ypixel)
Next ypixel
'totals All the columns of the Sub area
Next xpixel
localaverage=subtotal/40000
thanx
J x
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|