Gimptalk - Premier Gimp Community: Please help with science project!!!! - Gimptalk - Premier Gimp Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Please help with science project!!!!

#1 User is offline   SamIAm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 13-February 12

Posted 14 February 2012 - 01:16 AM

My teacher recommended I use gimp for my science fair project, but I can't seem to figure it out. I grew bacteria in petri dishes and took pictures of them, and was led to believe I could use gimp to find the area covered by the bacteria. I think it might be possible to find the area of the color of the bacteria, or the percent of the image that is that color, but I don't know how to do that, or if it is even possible. Please help! My project is due in a couple of days and I am terribly behind!
0

#2 User is offline   alexstandiford 

  • Member
  • PipPip
  • Group: Members
  • Posts: 144
  • Joined: 09-May 11

Posted 14 February 2012 - 01:24 AM

First off, you should learn about how you can use gimp to modify the exposure of an image: http://gimpedblog.bl...s-lesson-4.html
0

#3 User is offline   SamIAm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 13-February 12

Posted 14 February 2012 - 01:57 AM

Okay, I could adjust the colors, so the bacteria colonies become white and the rest of the petri dish becomes black. Is it possible to then find the percent of the photo that is white? Or even the number of pixels?
0

#4 User is offline   alexstandiford 

  • Member
  • PipPip
  • Group: Members
  • Posts: 144
  • Joined: 09-May 11

Posted 14 February 2012 - 02:10 AM

View PostSamIAm, on 14 February 2012 - 01:57 AM, said:

Okay, I could adjust the colors, so the bacteria colonies become white and the rest of the petri dish becomes black. Is it possible to then find the percent of the photo that is white? Or even the number of pixels?

Now that I don't know off hand. Perhaps you could select all of the black pixels with the select by color tool? Once you do that you can figure out how many pixels are selected. From there calculate the percent of pixels are selected from there?
0

#5 User is offline   SamIAm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 13-February 12

Posted 14 February 2012 - 02:25 AM

View Postalexstandiford, on 14 February 2012 - 02:10 AM, said:

<br />

View PostSamIAm, on 14 February 2012 - 01:57 AM, said:

<br />Okay, I could adjust the colors, so the bacteria colonies become white and the rest of the petri dish becomes black. Is it possible to then find the percent of the photo that is white? Or even the number of pixels?<br />
<br />Now that I don't know off hand.  Perhaps you could select all of the black pixels with the select by color tool?  Once you do that you can figure out how many pixels are selected. From there calculate the percent of pixels are selected from there?<br />
<br /><br /><br />

That might work. After you select the black area, you find the amount of pixels with the histogram tool, right? Thanks for your help, by the way.
0

#6 User is offline   alexstandiford 

  • Member
  • PipPip
  • Group: Members
  • Posts: 144
  • Joined: 09-May 11

Posted 14 February 2012 - 02:52 AM

View PostSamIAm, on 14 February 2012 - 02:25 AM, said:

View Postalexstandiford, on 14 February 2012 - 02:10 AM, said:

<br />

View PostSamIAm, on 14 February 2012 - 01:57 AM, said:

<br />Okay, I could adjust the colors, so the bacteria colonies become white and the rest of the petri dish becomes black. Is it possible to then find the percent of the photo that is white? Or even the number of pixels?<br />
<br />Now that I don't know off hand.  Perhaps you could select all of the black pixels with the select by color tool?  Once you do that you can figure out how many pixels are selected. From there calculate the percent of pixels are selected from there?<br />
<br /><br /><br />

That might work. After you select the black area, you find the amount of pixels with the histogram tool, right? Thanks for your help, by the way.

Well, I assume that you're looking for an exact amount of pixels, not a rough estimate. There has got to be a tool somewhere in gimp that will tell you how many pixels you have selected. Maybe in the toolbar at the bottom? I don't have gimp open in front of me so I don't know off hand.
0

#7 User is offline   SamIAm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 13-February 12

Posted 14 February 2012 - 04:14 AM

Okay, thanks anyway
0

#8 User is offline   paynekj 

  • Member
  • PipPip
  • Group: Members
  • Posts: 360
  • Joined: 01-June 05
  • LocationUK

Posted 14 February 2012 - 07:34 AM

Yes, the histogram dialog tells you the number of pixels, just drag the arrows around to alter the pixel value range that the numbers apply to: http://docs.gimp.org...ram-dialog.html
Kevin
0

#9 User is offline   ofnuts 

  • Moderator GT
  • Group: Moderators
  • Posts: 1,233
  • Joined: 17-October 10
  • LocationLooking over your shoulder :)

Posted 14 February 2012 - 08:03 AM

View PostSamIAm, on 14 February 2012 - 01:16 AM, said:

My teacher recommended I use gimp for my science fair project, but I can't seem to figure it out. I grew bacteria in petri dishes and took pictures of them, and was led to believe I could use gimp to find the area covered by the bacteria. I think it might be possible to find the area of the color of the bacteria, or the percent of the image that is that color, but I don't know how to do that, or if it is even possible. Please help! My project is due in a couple of days and I am terribly behind!

- Load your picture
- Window/Dockable dialog/Histogram

Posted Image

The "Count" value is the number of pixels in the image with a value (darkness/lightness) in the blue area, and the "Percentile" value is the ratio of these pixels over the whole image (so, above, there are about 10% pixels in the blue area).

In your case, you'll be counting the pixels under a given value, so you only have to move the handle from the right.
010011110110011001101110011101010111010001110011
0

#10 User is offline   SamIAm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 13-February 12

Posted 14 February 2012 - 04:46 PM

View Postofnuts, on 14 February 2012 - 08:03 AM, said:

<br />

View PostSamIAm, on 14 February 2012 - 01:16 AM, said:

<br />My teacher recommended I use gimp for my science fair project, but I can't seem to figure it out. I grew bacteria in  petri dishes and took pictures of them, and was led to believe I could use gimp to find the area covered by the bacteria. I think it might be possible to find the area of the color of the bacteria, or the percent of the image that is that color, but I don't know how to do that, or if it is even possible. Please help! My project is due in a couple of days and I am terribly behind!<br />
<br />- Load your picture<br />- Window/Dockable dialog/Histogram<br /><br /><img src="http://i.imgur.com/favnr.png" /><br /><br />The &quot;Count&quot; value is the number of pixels in the image with a value (darkness/lightness) in the blue area, and the &quot;Percentile&quot; value is the ratio of these pixels over the whole image (so, above, there are about 10% pixels in the blue area).<br /><br />In your case, you'll be counting the pixels under a given value, so you only have to move the handle from the right.<br />
<br /><br /><br />

But how do I know what range in the histogram to highlight? Is there a way to find the value of a certain color and highlight it in the histogram graph?
0

#11 User is offline   ofnuts 

  • Moderator GT
  • Group: Moderators
  • Posts: 1,233
  • Joined: 17-October 10
  • LocationLooking over your shoulder :)

Posted 14 February 2012 - 09:22 PM

View PostSamIAm, on 14 February 2012 - 04:46 PM, said:

View Postofnuts, on 14 February 2012 - 08:03 AM, said:

<br />

View PostSamIAm, on 14 February 2012 - 01:16 AM, said:

<br />My teacher recommended I use gimp for my science fair project, but I can't seem to figure it out. I grew bacteria in  petri dishes and took pictures of them, and was led to believe I could use gimp to find the area covered by the bacteria. I think it might be possible to find the area of the color of the bacteria, or the percent of the image that is that color, but I don't know how to do that, or if it is even possible. Please help! My project is due in a couple of days and I am terribly behind!<br />
<br />- Load your picture<br />- Window/Dockable dialog/Histogram<br /><br /><img src="http://i.imgur.com/favnr.png" /><br /><br />The &quot;Count&quot; value is the number of pixels in the image with a value (darkness/lightness) in the blue area, and the &quot;Percentile&quot; value is the ratio of these pixels over the whole image (so, above, there are about 10% pixels in the blue area).<br /><br />In your case, you'll be counting the pixels under a given value, so you only have to move the handle from the right.<br />
<br /><br /><br />

But how do I know what range in the histogram to highlight? Is there a way to find the value of a certain color and highlight it in the histogram graph?
If you try it will be a bit more evident... The bacteria will cause a bump in the histogram that you can bracket. You can use the Pointer dialog to get the Value (lightness, as part of HSV) of the pixel under cursor to help you. Ideally all pictures are taken in very similar conditions and you always use the same bracket values.

You can also use the Threshold tool (or even the Curves tool) to obtain a pure Black and white image which most closely reproduces the shape of the bacteria as you perceive it. This would be the values to use for bracketing.

Side note: if you use a selection (freehand or else) then the Histogram only applies to the selection, so you can for instance restrict the histogram to the dish contents by making a selection that follow the dish.
010011110110011001101110011101010111010001110011
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic