# Gimp script: Selection area finder

Show 40 post(s) from this thread on one page
Page 2 of 2 First 12
• 03-26-2010, 06:57 AM
blocus
;-)
Quote:

Originally Posted by Redrobes
In theory it should be right or somewhat close. All I can suggest is that a micro meter is 10^-6 not 10^-3 which is millimeters. So if you were a 1000 or a 1000000 out in area then that could be the case. Otherwise I am not sure.

Thx again ;-) So i resolve in part my problem of area assessment :-) But I have an other question :
How to select a range of pixels (threshold) we are interesting in , in a specific area , whitout to select the all pixel from the picture,
Now I need to assess the area of Pixel from a certain range of gray ....
If you have an idea ;) or severals :P You can submit to me .
Merci
• 03-26-2010, 07:09 AM
Redrobes
I dont use GIMP but in the program I use there is a magic wand selection tool where you say how much tolerance you give it. So if you select a point with grey 128,128,128 then you select 30 tolerance then it will pick from 98,98,98 to 158,158,158.

Another option is to take a copy of the image and use a contrast adjustment so that the range you are looking for is black and the rest is white. The easiest way to do that is with the adjust colours using a 'curves' tool where you can select from and to adjustments using graph curves. Then the area selection is just a black and white image again.
• 03-27-2010, 05:36 PM
isomage
• 03-29-2010, 10:11 AM
blocus
Quote:
Thanks a lot for your help, I succeed now to assess pixel area with a certain threshold im Gimp.
I Have another question , I tried to do the same process on another software called Image J , in order to find out the most convenient software to do this measurement.
But I don't succeed to determine the number of pixel from a certain range on a certain selection from my image in the Image J software.
For the moment I set up first the threshold , then it colored me all the area from my image, then I go in Analyse Particles and then I can't found out how to seperate my areas to do indepandant calcul ...
• 09-12-2010, 08:39 AM
komplwx
I can't get it to work, I keep getting the same Areas as Blocus... What do i need to do, to make it work on my SVG file? Im not use to using GIMP. =/
• 11-09-2011, 04:59 PM
antlee53
Hi, I'm having trouble getting this script to work. When I go to run it under select>area and perimeter, the following error messages come up:

GIMP Error
Calling error for procedure 'gimp-histogram':
Procedure 'gimp-histogram' has been called with value '256' for argument 'end-range' (#4, type GimpInt32). This value is out of range.

GIMP Error
Execution error for 'Area and perimeter':
Error: Procedure execution of gimp-histogram failed on invalid input arguments: Procedure 'gimp-histogram' has been called with value '256' for argument 'end-range' (#4, type GimpInt32). This value is out of range.

Does anyone know what I could do to fix this? Much appreciated!
• 11-09-2011, 06:18 PM
RobA
Quote:

Originally Posted by antlee53
Hi, I'm having trouble getting this script to work. When I go to run it under select>area and perimeter, the following error messages come up:

GIMP Error
Calling error for procedure 'gimp-histogram':
Procedure 'gimp-histogram' has been called with value '256' for argument 'end-range' (#4, type GimpInt32). This value is out of range.

GIMP Error
Execution error for 'Area and perimeter':
Error: Procedure execution of gimp-histogram failed on invalid input arguments: Procedure 'gimp-histogram' has been called with value '256' for argument 'end-range' (#4, type GimpInt32). This value is out of range.

Does anyone know what I could do to fix this? Much appreciated!

What version of Gimp are you using? There was a "bug" fix that changed the histogram to be limited 0-255 at one point.... This script might be from before that.

-Rob A>
• 11-09-2011, 06:56 PM
antlee53
Quote:

Originally Posted by RobA
What version of Gimp are you using? There was a "bug" fix that changed the histogram to be limited 0-255 at one point.... This script might be from before that.

-Rob A>

Cheers for the speedy reply! I'm using 2.6.11. Is there a way to get around this so I can use this script?
• 11-09-2011, 08:07 PM
RobA
Quote:

Originally Posted by antlee53
Cheers for the speedy reply! I'm using 2.6.11. Is there a way to get around this so I can use this script?

Attached is a fixed version.

Note I discovered it has a small bug in the perimeter calculation IF the selection touches the image edges, those edges are not included in the perimeter calculation.

No time to fix that bug now, sorry. The workaround see to enlarge the canvas/layer, or just don't select to the edges :P

-Rob A>
• 11-09-2011, 08:46 PM
antlee53
Quote:

Originally Posted by RobA
Attached is a fixed version.

Note I discovered it has a small bug in the perimeter calculation IF the selection touches the image edges, those edges are not included in the perimeter calculation.

No time to fix that bug now, sorry. The workaround see to enlarge the canvas/layer, or just don't select to the edges :P

-Rob A>

Thanks heaps, this is super helpful!
Show 40 post(s) from this thread on one page
Page 2 of 2 First 12