Superb - so you use a selection wand in the area and then ask it how big this is. Cool and probably clearer than using the histogram window.
I just wrote a little GIMP script inspired by the discussion here: http://www.cartographersguild.com/showthread.php?t=2279
It will tell you the perimeter of the current selection in pixels and the area as a percentage of the total image area.
Installation and use: Once you've installed the .scm file in your gimp scripts directory, "Area and perimeter" is accessible under "Select" from the image menu.
UPDATE: Version 0.2.0 - added perimeter-finding
Last edited by isomage; 12-13-2008 at 03:37 AM. Reason: New version
Last edited by isomage; 12-12-2008 at 09:45 PM.
For a test, I computed the area of Texas using this image.
The image is 750 x 733 pixels. According to its scale, 96 pixels = 100 miles.
Selecting Texas and running the script gave 47.2%. The selected area was then (100 / 96)^2 * 750 * 733 * 0.472 = 281556 square miles.
Wikipedia says that the area of Texas is 268820 square miles. If the map and its scale are perfectly accurate, then we've overestimated by a little less than 5%.
That's not too bad an estimate, considering that the map may not be perfectly accurate; a scale of 98.2478 pixels per 100 miles, instead of 96, would have given a correct result -- a mere two pixels of difference.
Last edited by isomage; 12-13-2008 at 03:43 AM.
My Map Challenge Entries
I use GIMP for all my maps.
GIMP scripts and plug-ins overview
Everything I post on this site uses the Creative Common Attribution-Noncommercial-Share Alike license. Only exception to this are any pyhton scripts which use the GPL.
If you are using any of my posted stuff just use your rep stick on me
Should you be interested in using anything I posted on commercial purpose drop me a pm.
Note that the histogram function doesn't work on color-indexed images. The script currently will only work in RGB mode, though I may add support for grayscale later.
I follow your instruction isoman but once i installed the file and i select perimeter and area , Gimp heralds me 2 errors
such as : Calling error for procedure 'gimp-image-add-layer'
and execution error for Area and perimeter : error procedure execution of .... failed on invalid input arguments : image '... ' is of type 'gray', but an image of type 'rgb' is expected
Thx a lot for your fast answer, I selected the RGB mode, and then it assest the perimeter as well as the area , however i found that the value are wrong compare to the reality.
Indeed I'm interesting in the area, and when i compare the number of pixel from the histogram option and the percentage of area ( %*nm of pixel) the value are similar. But when i converted with the real scale , in my case i use 150 micrometers , so I multiplicate the number of pixel per 150*10e-3 and it gives wrong estimation , do you have an idea to assess the superficie with the number of pixel ?
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.