[Gimp-user] Measure tool (feature proposition)
Installation depends on your OS, but you do need python installed. If your OS is Windows and you do not already have python installed, I think that you need to install python, then re-run the GIMP installer - but Windows is not my primary OS, so that could be wrong. Once python is available in GIMP (Filters->Python-Fu->Console), place the plug-in into the .gimp-2.6.x dir in your docs folder. In linux, you just need to install python-gimp (or gimp-python, don't remember) and place the plug-in in ~/.gimp-2.6 and make sure it's executable. I found that, also, if you put the python script in your plug-ins folder it also works. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
On Wed, Aug 26, 2009 at 5:31 PM, Noel Stoutenburg wrote: > If I'd read the posts in this thread in a different order, or at least > read all of the posts before making a response, instead of writing >> BTW, I'm not sure I've ever had the occasion to need this in GIMP, but >> if it is not there, the ability to determine the total length of a >> selected path in pixels might also be a nice addition. Maybe this would >> be a good Summer of Code 2010 project, though. >> > > I'd have instead asked for the name of Chris Mohler's plug-in, and where > to find it in GIMP, or if it's not included in the main distribution, > where to find it and how to install it. The plug-in lives here: http://registry.gimp.org/node/17235 I've not uploaded version 0.3 to the registry yet though - I attached it to an earlier message in this thread. the only addition in v 0.3 is two integer fields - one for pixels and one for arbitrary units - if those boxes are filled in, the plug-in reports the path length in units (as opposed to pixels, the default). Installation depends on your OS, but you do need python installed. If your OS is Windows and you do not already have python installed, I think that you need to install python, then re-run the GIMP installer - but Windows is not my primary OS, so that could be wrong. Once python is available in GIMP (Filters->Python-Fu->Console), place the plug-in into the .gimp-2.6.x dir in your docs folder. In linux, you just need to install python-gimp (or gimp-python, don't remember) and place the plug-in in ~/.gimp-2.6 and make sure it's executable. Sorry for any typos - I'm in the middle of painting the house and am crouched in a funny position - no furniture ;) Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
If I'd read the posts in this thread in a different order, or at least read all of the posts before making a response, instead of writing > BTW, I'm not sure I've ever had the occasion to need this in GIMP, but > if it is not there, the ability to determine the total length of a > selected path in pixels might also be a nice addition. Maybe this would > be a good Summer of Code 2010 project, though. > I'd have instead asked for the name of Chris Mohler's plug-in, and where to find it in GIMP, or if it's not included in the main distribution, where to find it and how to install it. ns ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
I agree with Adam that it might be a valuable addition to be able to select an area of GIMP, and determine the size of area. As to scaling issues, as when dealing with a map, the method I use for this is to open an instance of my favorite spreadsheet program in a small (about 3 or 4 dozen cells--6 x 6 or 6 x 8--window, and use that to do any necessary math calculations. When confronted with Adam's problem of scaling from a distance on a map measured in pixels to an actual distance, I enter the necessary formula in spreadsheet cell, and when I enter a number of pixels, and the spreadsheet cell shows the actual distance. from for example, if I have an image of some object that I know to be perpendicular, but is not parallel to the plain of the image, and I want to change the perspective so the image appears parallel, AND so that the length of the image is unchanged when it the perspective is altered. BTW, I'm not sure I've ever had the occasion to need this in GIMP, but if it is not there, the ability to determine the total length of a selected path in pixels might also be a nice addition. Maybe this would be a good Summer of Code 2010 project, though. ns Adam Majewski wrote: > Hi there, > > i sometimes need to measure distances on photo. > i do so using not only gimp but i need also calculator to do it. > > The problem is that the measure tool doesn't have scale parameter. > It would be great if i can firstly measure scale and set distance > for it (ex 20px = 38m) and then measure other things that i need, > where the result will be shown not only in px but also in meters > (or other units ex. mile, foot, inch etc). > > Easiest example is screenshot of google map, where you have scale > on bottom, and you would like to know the distance from A to B on > this scale. > > Much further feature would be measure of areas, using also > feature of scale. > Simple areas like square, rectangle, or any of quadrilaterals, > triangle, oval, circle, ellipse etc... > > This would be perfect, but i don't know to whom i should send this > proposition, so please forward it to right persons if they are not > reading this list. > > Kind regards! > > > Pozdrawiam, > Adam. > > ___ > Gimp-user mailing list > Gimp-user@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user > > > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
Dnia Wed, 26 Aug 2009 15:28:12 -0500 Chris Mohler napisał(a): > On Wed, Aug 26, 2009 at 3:02 PM, Adam Majewski wrote: > > thank you for your answer and script. i run it, and i removed > > every int() because there were much differences between results. > > Without int results are very close (almost the same). > > > > Maybe i will more frequently use solution posted by Daniel Hornung, > > but this will give me some more possibilities :) > > No problem - when I read your question I realized that I could just > add a couple of lines to the plug-in and it might solve the problem. > One nice thing is that you can draw a path with multiple segments or > curves and it should still be fairly accurate. that's true, this plugin gives me possibility to measure not only straight line, but also complex one what is very cool :) It is also very useful to measure circuits! Also fast with selection -> path conversion, so i am glad for your post! Regards! Pozdrawiam, Adam. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
On Wed, Aug 26, 2009 at 3:02 PM, Adam Majewski wrote: > thank you for your answer and script. i run it, and i removed > every int() because there were much differences between results. > Without int results are very close (almost the same). > > Maybe i will more frequently use solution posted by Daniel Hornung, > but this will give me some more possibilities :) No problem - when I read your question I realized that I could just add a couple of lines to the plug-in and it might solve the problem. One nice thing is that you can draw a path with multiple segments or curves and it should still be fairly accurate. Chris ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
Dnia Wed, 26 Aug 2009 11:43:00 -0500 Chris Mohler napisał(a): > On Wed, Aug 26, 2009 at 11:14 AM, Adam Majewski wrote: > > If someone will have solution i am interested in! > > I just hacked my path measurement plug-in to handle this. You need > gimp-python. Once it's installed: > > 1. Draw a path with the pen tool over what needs to be measured. > 2. Filters->Measure->Active Path > - Enter pixels (integer) from the ratio in the first box, and > units (integer) in the second box (eg, meters). > > Then look in the Error console for output. Did not test it much - let > me know if it works out... Hi Chris, thank you for your answer and script. i run it, and i removed every int() because there were much differences between results. Without int results are very close (almost the same). Maybe i will more frequently use solution posted by Daniel Hornung, but this will give me some more possibilities :) thank you!! Regards! Pozdrawiam, Adam. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
Dnia Wed, 26 Aug 2009 20:08:01 +0200 Daniel Hornung napisał(a): > On Wednesday 26 August 2009, Adam Majewski wrote: > > Hi there, > > > > i sometimes need to measure distances on photo. > > i do so using not only gimp but i need also calculator to do it. > > > > The problem is that the measure tool doesn't have scale parameter. > > It would be great if i can firstly measure scale and set distance > > for it (ex 20px = 38m) and then measure other things that i need, > > where the result will be shown not only in px but also in meters > > (or other units ex. mile, foot, inch etc). > > Hello Adam, > > you could just set the resolution (pixels / whatever) in Image>Print Size and > set the display units to whatever you need in the little dropdown menu near > the status bar. Then the measure tool should always give you the real-world > size as well. The only thing you have to do by hand is calculating the > resolution in the first place. Some image formats like tiff and png even > save that setting. wow, this is brilliant and so simple solution, why didn't i write this post earlier ;) counting scale once and then doing what is needed ;) > > Much further feature would be measure of areas, using also > > feature of scale. > > Simple areas like square, rectangle, or any of quadrilaterals, > > triangle, oval, circle, ellipse etc... > > > > This would be perfect, but i don't know to whom i should send this > > proposition, so please forward it to right persons if they are not > > reading this list. > > I don't know if there are plugins for this in GIMP, but other imaging > applications like ImageJ/Fiji can do stuff like this easily. (They offer much > less creative possibilities though.) thank you for giving example of software, i am actually downloading it, maybe gimp will not be run anymore just to measure task. i will check it. thanks a lot! Pozdrawiam, Adam. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
On Wednesday 26 August 2009, Adam Majewski wrote: > Hi there, > > i sometimes need to measure distances on photo. > i do so using not only gimp but i need also calculator to do it. > > The problem is that the measure tool doesn't have scale parameter. > It would be great if i can firstly measure scale and set distance > for it (ex 20px = 38m) and then measure other things that i need, > where the result will be shown not only in px but also in meters > (or other units ex. mile, foot, inch etc). Hello Adam, you could just set the resolution (pixels / whatever) in Image>Print Size and set the display units to whatever you need in the little dropdown menu near the status bar. Then the measure tool should always give you the real-world size as well. The only thing you have to do by hand is calculating the resolution in the first place. Some image formats like tiff and png even save that setting. > Much further feature would be measure of areas, using also > feature of scale. > Simple areas like square, rectangle, or any of quadrilaterals, > triangle, oval, circle, ellipse etc... > > This would be perfect, but i don't know to whom i should send this > proposition, so please forward it to right persons if they are not > reading this list. I don't know if there are plugins for this in GIMP, but other imaging applications like ImageJ/Fiji can do stuff like this easily. (They offer much less creative possibilities though.) Daniel signature.asc Description: This is a digitally signed message part. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
You have to have a scale in the image, don't you?! Find a known quantity and account for the projection. Tom Hart From: Norman Silverstone To: gimp-user@lists.XCF.Berkeley.EDU Sent: Wednesday, August 26, 2009 12:29:40 PM Subject: Re: [Gimp-user] Measure tool (feature proposition) < snip > > Now i am doing it with calc. I am counting pixels at scale > and then if i know how many px is for 200m then i can count how > many meters i for 743px. > > If someone will have solution i am interested in! Just a suggestion why not go to http://forum.meetthegimp.org/ where there is a section for ideas for scripts and a programmer who can advise. Norman ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
On Wed, Aug 26, 2009 at 11:14 AM, Adam Majewski wrote: > If someone will have solution i am interested in! I just hacked my path measurement plug-in to handle this. You need gimp-python. Once it's installed: 1. Draw a path with the pen tool over what needs to be measured. 2. Filters->Measure->Active Path - Enter pixels (integer) from the ratio in the first box, and units (integer) in the second box (eg, meters). Then look in the Error console for output. Did not test it much - let me know if it works out... HTH, Chris #!/usr/bin/env python # Author: Chris Mohler # Copyright 2009 Chris Mohler # License: GPL v3 # Version 0.3 # GIMP plugin to measure the length of a path from gimpfu import * gettext.install("gimp20-python", gimp.locale_directory, unicode=True) def measure_path(img, drw, pixels, units): try: path = pdb.gimp_image_get_active_vectors(img) len = pdb.gimp_vectors_stroke_get_length(path, 1, 1) len = int(len) if pixels != 0 and units!=0: len = int((len/pixels)*units) pdb.gimp_message("Length of " + path.name + ": " + str(len) + " units") else: pdb.gimp_message("Length of " + path.name + ": " + str(len) + " px") except: pass register( proc_name=("python-fu-measure-path"), blurb=("Measure Path"), help=("Measure Length of the active path. Output is directed to the Status Bar or Error Console."), author=("Chris Mohler"), copyright=("Chris Mohler"), date=("2009"), label=("Active Path"), imagetypes=("*"), params=[ (PF_IMAGE, "img", "Image", None), (PF_DRAWABLE, "drw", "Drawable", None), (PF_INT, "pixels", "Pixels", 0), (PF_INT, "units", "Units", 0) ], results=[], function=(measure_path), menu=("/Filters/Measure"), domain=("gimp20-python", gimp.locale_directory) ) main() ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
< snip > > Now i am doing it with calc. I am counting pixels at scale > and then if i know how many px is for 200m then i can count how > many meters i for 743px. > > If someone will have solution i am interested in! Just a suggestion why not go to http://forum.meetthegimp.org/ where there is a section for ideas for scripts and a programmer who can advise. Norman ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
Dnia Wed, 26 Aug 2009 16:09:14 +0200 Rikard Johnels napisał(a): > > i sometimes need to measure distances on photo. > > i do so using not only gimp but i need also calculator to do it. > > > > The problem is that the measure tool doesn't have scale parameter. > > It would be great if i can firstly measure scale and set distance > > for it (ex 20px = 38m) and then measure other things that i need, > > where the result will be shown not only in px but also in meters > > (or other units ex. mile, foot, inch etc). > > > > Easiest example is screenshot of google map, where you have scale > > on bottom, and you would like to know the distance from A to B on > > this scale. > > > > Much further feature would be measure of areas, using also > > feature of scale. > > Simple areas like square, rectangle, or any of quadrilaterals, > > triangle, oval, circle, ellipse etc... > > > > This would be perfect, but i don't know to whom i should send this > > proposition, so please forward it to right persons if they are not > > reading this list. > I am not much of a programmer, but cant this be done by writing a script? > The measurement tool gives you pixels, and then let the script recalculate it > to what ever unit you want?? Hi, i am not a programmer at all, so also script is out of my knowledge. But to make what i am talking about you will need 2 parameters. First is scale ex 10px=30m, and then how many pixels from point A to B. Now i am doing it with calc. I am counting pixels at scale and then if i know how many px is for 200m then i can count how many meters i for 743px. If someone will have solution i am interested in! Regards! Pozdrawiam, Adam. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Measure tool (feature proposition)
On Wednesday 26 August 2009 14:41:43 Adam Majewski wrote: > Hi there, > > i sometimes need to measure distances on photo. > i do so using not only gimp but i need also calculator to do it. > > The problem is that the measure tool doesn't have scale parameter. > It would be great if i can firstly measure scale and set distance > for it (ex 20px = 38m) and then measure other things that i need, > where the result will be shown not only in px but also in meters > (or other units ex. mile, foot, inch etc). > > Easiest example is screenshot of google map, where you have scale > on bottom, and you would like to know the distance from A to B on > this scale. > > Much further feature would be measure of areas, using also > feature of scale. > Simple areas like square, rectangle, or any of quadrilaterals, > triangle, oval, circle, ellipse etc... > > This would be perfect, but i don't know to whom i should send this > proposition, so please forward it to right persons if they are not > reading this list. > > Kind regards! > > > Pozdrawiam, > Adam. > > ___ > Gimp-user mailing list > Gimp-user@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user I am not much of a programmer, but cant this be done by writing a script? The measurement tool gives you pixels, and then let the script recalculate it to what ever unit you want?? -- /Rikard Johnels ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Measure tool (feature proposition)
Hi there, i sometimes need to measure distances on photo. i do so using not only gimp but i need also calculator to do it. The problem is that the measure tool doesn't have scale parameter. It would be great if i can firstly measure scale and set distance for it (ex 20px = 38m) and then measure other things that i need, where the result will be shown not only in px but also in meters (or other units ex. mile, foot, inch etc). Easiest example is screenshot of google map, where you have scale on bottom, and you would like to know the distance from A to B on this scale. Much further feature would be measure of areas, using also feature of scale. Simple areas like square, rectangle, or any of quadrilaterals, triangle, oval, circle, ellipse etc... This would be perfect, but i don't know to whom i should send this proposition, so please forward it to right persons if they are not reading this list. Kind regards! Pozdrawiam, Adam. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] measure tool
Thanks On Sun, Mar 30, 2008 at 10:26 PM, David Gowers <[EMAIL PROTECTED]> wrote: > No. almost all the information it provides is trivial to calculate. > > On Mon, Mar 31, 2008 at 1:48 PM, dorai iyer <[EMAIL PROTECTED]> wrote: > > Is there a pdb that uses measure tool? > > > > ___ > > Gimp-user mailing list > > Gimp-user@lists.XCF.Berkeley.EDU > > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user > > > > > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] measure tool
No. almost all the information it provides is trivial to calculate. On Mon, Mar 31, 2008 at 1:48 PM, dorai iyer <[EMAIL PROTECTED]> wrote: > Is there a pdb that uses measure tool? > > ___ > Gimp-user mailing list > Gimp-user@lists.XCF.Berkeley.EDU > https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user > > ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] measure tool
Is there a pdb that uses measure tool? ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user