[Spambayes] image analyze
Luigi Pugnetti
pl at symbolic.it
Thu Nov 2 17:22:15 CET 2006
Hello,
I think there is an errore in the frame selection inside
PIL_decode_parts().
for frame in ImageSequence.Iterator(image):
# Assume the pixel with the largest value is the
# background.
bg = max(frame.histogram())
if bg < bgpix:
image = frame
bgpix = bg
outside this loop image (in my opinion) will be always the last frame of
original image.
A part from this the algorithm could be better. From my test
using stddev and sum2 yield better result.
>From a (very) raw test you may use the attached code snippet.
Of course all of these are very simple test and can be wrong bug you
test failed for a pattern common few days ago (see the attached image)
--
Luigi Pugnetti
Symbolic S.p.A.
V.le Mentana, 29
I-43100 Parma
Italy
Tel: +39 0521 708811
Fax: +39 0521 776190
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_frame.py
Type: text/x-python
Size: 4002 bytes
Desc: not available
Url : http://mail.python.org/pipermail/spambayes/attachments/20061102/1a07460f/attachment-0001.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: feedback.gif.gz
Type: application/x-gzip
Size: 16684 bytes
Desc: not available
Url : http://mail.python.org/pipermail/spambayes/attachments/20061102/1a07460f/attachment-0001.bin
More information about the SpamBayes
mailing list