Re: [Gimp-user] get raw histogram data for image, not just statistics

2007-09-12 Thread Sven Neumann
Hi,

On Tue, 2007-09-11 at 07:15 -0700, phil laks wrote:

 however the only function i see in the PDB is 
 (mean,std_dev,median,pixels,count,percentile) = gimp_histogram 
 (drawable,channel,start_range,end_range) 
 which would require 256 calls of this function to get the data. Is 
 there another function that can return an array of the histogram? 

What's wrong with doing 256 PDB calls? Shouldn't take considerable time
to complete. If you dislike this, you could also look at the pixel data
and create the histogram yourself.


Sven



___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] get raw histogram data for image, not just statistics

2007-09-11 Thread phil laks
Hi, 
 I would like to use the perl interface to automate processing of black and 
white images. I would like to set a threshold for white vs black on the images 
based 
 upon the histogram without 
 physically looking at each image. I dont want to do it  using the gimp-gui. 
 I would like to get an array consisting of the histogram 
 hist[i] = count of pixels in image with intensity i. 
 
however the only function i see in the PDB is 
 (mean,std_dev,median,pixels,count,percentile) = gimp_histogram 
 (drawable,channel,start_range,end_range) 
 which would require 256 calls of this function to get the data. Is 
 there another function that can return an array of the histogram? 
 
My goal is to use the histogram to pick a threshold between gray 
 background and text on a jpg image of a book page that I make a 
 picture of with my digital camera. 
 
Thanks 
 Mitchell

I also posted this to usenet gimp group. I dont know how to avoid cross posting 
this. 
 
   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. ___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user