anisha3 has asked for the wisdom of the Perl Monks concerning the following question:
Hello!!!!! I have a query :How to count the objects in video???for example the video consists of worms which move frequently and i would like to know how many times it move???I have tried counting in files not videos ...can any one please guide me how should i generate the coding..the coding I pasted is for files but please tell me for videos or at least for images
open(FILE, "<file.txt") or die "Could not open file: $!"; my ($lines, $words, $chars) = (0,0,0); while (<FILE>) { $lines++; $chars += length($_); $words += scalar(split(/\s+/, $_)); } print("lines=$lines words=$words chars=$chars\n");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regarding Perl Counting
by atcroft (Abbot) on Feb 14, 2014 at 17:24 UTC | |
by jellisii2 (Hermit) on Feb 14, 2014 at 17:49 UTC | |
|
Re: Regarding Perl Counting
by LanX (Saint) on Feb 14, 2014 at 18:32 UTC | |
|
Re: Regarding Perl Counting (WormScan)
by erix (Prior) on Feb 16, 2014 at 07:18 UTC | |
|
Re: Regarding Perl Counting
by karlgoethebier (Abbot) on Feb 14, 2014 at 20:28 UTC |