Prev: mailbox.mbox not locking mbox properly
Next: need a json representation of all members of any type of object, list or hashtable (php's var_dump)
From: Gary Herron on 9 Aug 2010 19:56 On 08/09/2010 04:27 PM, Anahita Yazdi wrote: > Hi, > I was just wondering how would I be able to get some extra help > regarding editing an image's histogram using python's module? I have > modified a histogram of an image however I dont know how to apply the > new histogram to the image and basically reload the image based on its > new modified histogram instead of its own histogram? In the other > words how should I make changes on an image's histogram in a way that > the image recognizes the new histogram and gets changed? I need to > somehow introduce a LUT for the image and use ".point(table)" function > to reload the image however I am not sure how to make the right LUT > from a modified histogram! > Thanks for the help in advance, > Anahita This is a Python newsgroup, not an image processing news group. If you are asking for an algorithm to modify an image -- then you are on the wrong list, and you'd be better off asking on some image processing news group. If, on the other hand, you have an image processing algorithm in mind, then tell us about the algorithm, and we'll discuss how to implement it in Python. Gary Herron
From: Paul Rubin on 9 Aug 2010 20:02 Gary Herron <gherron(a)islandtraining.com> writes: > This is a Python newsgroup, not an image processing news group. > If you are asking for an algorithm to modify an image.... I saw it as a question of how to do something using PIL. Seems ok to me.
From: Gary Herron on 9 Aug 2010 21:23
On 08/09/2010 05:02 PM, Paul Rubin wrote: > Gary Herron<gherron(a)islandtraining.com> writes: > >> This is a Python newsgroup, not an image processing news group. >> If you are asking for an algorithm to modify an image.... >> > I saw it as a question of how to do something using PIL. Seems ok to me. > A quote from the OP: "however I dont know how to apply the new histogram to the image" PIL has no such operation. I have no knowledge of any such operation. And frankly, I'm having a hard time imagining what "apply a histogram to the image" even means. (For instance if the original histogram says there are 30 pixels with some value, and the new histogram says there should be 20 pixels with that value -- which 10 do I replace, and with what do I replace them?) We can help him use PIL to read, manipulate, and write an image. But the actual manipulation he is requesting is so far unspecified. So I'll repeat: If he is looking for an algorithm -- I haven't got one. If he has an algorithm -- tell us about it, and we'll discuss implementing it in Python. Gary Herron |