You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Olivier Nicole <on...@cs.ait.ac.th> on 2007/11/16 07:23:17 UTC

FuzzyOcr: selecting what frame for animated GIFs

Hi,

By default FuzzyOcr will analize only one frame from animated GIFs.

If the animation goes one word by frame: "Click", "Here", "Now",
selecting only one frame will give no sensible result. It woul dbe
better to concatenate all the frames into one single image and process
that image.

The following patch does that: http://fuzzyocr.own-hero.net/ticket/420

- if the loop is finite (or if there is no loop), only the last frame
  is analyzed;

- if the loop is infinite but one frame is on display for a duration
  that is much longer than other frames, only that frame is analyzed.

  The exact definition of "much longer" is open to discussion, I
  choosed that the dominant frame should be there on more than 50% of
  teh total time of the animation, but one could choose that the
  dominant frame should be only x time the average duration of one
  frame.

- else all the frames are constructed into a single image that is
  analyzed.

Bests,

Olivier

Re: FuzzyOcr: selecting what frame for animated GIFs

Posted by Olivier Nicole <on...@cs.ait.ac.th>.
Hi Rob,

> I'm using FuzzyOCR from SVN (don't know if that's the problem) and was
> unable to apply the patch because I got this error:
> 
> patching file FuzzyOcr/Deanimate.pm
> Hunk #1 succeeded at 64 (offset 17 lines).
> patch: **** malformed patch at line 115:  
> 
> I manually applied the changes and made a new diff which works (on SVN
> source). If needed (maybe I did something stupid which makes this
> unnecessary), I can post it to the FuzzyOCR ticket system.

I am not sure what version of FuzzyOCR I am working with :( 

Please feel free to propose your patch on the ticket system.

Best regards,

Olivier



RE: FuzzyOcr: selecting what frame for animated GIFs

Posted by Rob Sterenborg <R....@netsourcing.nl>.
Olivier Nicole wrote:
> Hi,
> 
> By default FuzzyOcr will analize only one frame from animated GIFs.
> 
> If the animation goes one word by frame: "Click", "Here", "Now",
> selecting only one frame will give no sensible result. It woul dbe
> better to concatenate all the frames into one single image and
> process that image. 
> 
> The following patch does that: http://fuzzyocr.own-hero.net/ticket/420
[...]

I'm using FuzzyOCR from SVN (don't know if that's the problem) and was
unable to apply the patch because I got this error:

patching file FuzzyOcr/Deanimate.pm
Hunk #1 succeeded at 64 (offset 17 lines).
patch: **** malformed patch at line 115:  

I manually applied the changes and made a new diff which works (on SVN
source). If needed (maybe I did something stupid which makes this
unnecessary), I can post it to the FuzzyOCR ticket system.


Grts,
Rob