🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.graphics
9 messages
9 total messages Started by John Mon, 04 Aug 2008 14:21
pattern recognition
#124
Author: John
Date: Mon, 04 Aug 2008 14:21
9 lines
892 bytes
Hello,

I need to do pattern recognition in a 2D picture.

Any delphi sample or library for this kind of stuff ?

Thanks

John
Re: pattern recognition
#126
Author: jacques antoine
Date: Mon, 04 Aug 2008 15:28
5 lines
970 bytes
> I need to do pattern recognition in a 2D picture.

OCR or what kind of pattern?

J.
Re: pattern recognition
#256
Author: John
Date: Tue, 05 Aug 2008 08:09
8 lines
1236 bytes
Thanks for your reply.

the entire design is in B&W, and each pattern is a rectangular pattern 
with dots (B&W) inside it.
for instance here each different pattern will be filled with different 
colors : http://www.pointcarre.com/Tribune/imarticles/Unfill/GB_resum.html

thanks
Re: pattern recognition
#258
Author: Rabatscher Michael
Date: Tue, 05 Aug 2008 10:56
16 lines
1740 bytes
> for instance here each different pattern will be filled with different 
> colors : http://www.pointcarre.com/Tribune/imarticles/Unfill/GB_resum.html
A quick one would be to define a sliding window and sum up all pixels 
within this window. If the sum exceeds a certain threshold you know that
you are within a very bright area.
A quite good algorithm for segmenting is the graphcut algorithm which I 
think is quite suitable for your problem.

You could also use different texture filters and segment your picture 
according to the result of these filters.

For literature just google, but I don't know any implementations in 
Delphi unfortunatelly.

kind regards
   Mike
Re: pattern recognition
#259
Author: John
Date: Tue, 05 Aug 2008 11:27
14 lines
1838 bytes
Thanks Mike for your reply.

in fact here it could suggest that if find a bright area, in fact not, 
even if the pattern is in B&W, it should be strictely identical....not 
another one with similar brightness.I mean for instance if the pattern 
is 10x10 size, and with 20 black dot, another pattern with same size and 
same number of dot is false, the dots should be at the same place...

>> for instance here each different pattern will be filled with different 
>> colors : 
>> http://www.pointcarre.com/Tribune/imarticles/Unfill/GB_resum.html
> A quick one would be to define a sliding window and sum up all pixels 
> within this window. If the sum exceeds a certain threshold you know that
> you are within a very bright area.
Re: pattern recognition
#261
Author: Rabatscher Michael
Date: Tue, 05 Aug 2008 12:29
15 lines
1836 bytes
John schrieb:
> Thanks Mike for your reply.
> 
> in fact here it could suggest that if find a bright area, in fact not, 
> even if the pattern is in B&W, it should be strictely identical....not 
> another one with similar brightness.I mean for instance if the pattern 
> is 10x10 size, and with 20 black dot, another pattern with same size and 
> same number of dot is false, the dots should be at the same place...
you could define the pattern you like in a window and slide again over 
the complete image. Try to calcualte a difference (or another value: 
e.g.: cross correlation or sum of mean square values of differences) 
value from the pattern to your underlying image.

kind regards
   Mike
Re: pattern recognition
#264
Author: John
Date: Tue, 05 Aug 2008 12:53
1 lines
1078 bytes
Thanks Mike
Re: pattern recognition
#268
Author: Jim P
Date: Tue, 05 Aug 2008 18:08
48 lines
3018 bytes
John wrote:
> Thanks Mike for your reply.
> 
> in fact here it could suggest that if find a bright area, in fact not, 
> even if the pattern is in B&W, it should be strictely identical....not 
> another one with similar brightness.I mean for instance if the pattern 
> is 10x10 size, and with 20 black dot, another pattern with same size and 
> same number of dot is false, the dots should be at the same place...
> 
>>> for instance here each different pattern will be filled with 
>>> different colors : 
>>> http://www.pointcarre.com/Tribune/imarticles/Unfill/GB_resum.html
>> A quick one would be to define a sliding window and sum up all pixels 
>> within this window. If the sum exceeds a certain threshold you know that
>> you are within a very bright area.


hum

you got the area to compare,

Do and bitwise XOR of the pixels or bytes as it seems to be B/W only
if any result is non-zero you do not match - - exit and try next spot.


This could be a bit like the search routine that a company that I worked 
for in the late 70's did.

This was on an old 8080 micro - - so no real speed and files could be 
large - - (for those days)

They did a search not for the first character but in effect the lease 
common.

say you are searching for the word "exit" in a file.
The code would start looking for the "e" and upon finding it, then check 
for the next letter 'x' - - - do not find it then rest - - but keep 
looking for the 'x' till it is found - - - then check if the next is the 
'i' and the next is the 't' and then check the letters at the start - 
being sure that a match is found - - -

The same can apply here - - The concept is that this tends to look for 
the lease common pattern or char - -

They found this had quite a bit of speed up in terms of operation.


Jim P.
Re: pattern recognition
#288
Author: John
Date: Wed, 06 Aug 2008 09:10
49 lines
3075 bytes
Thank Jim
> John wrote:
>> Thanks Mike for your reply.
>>
>> in fact here it could suggest that if find a bright area, in fact not, 
>> even if the pattern is in B&W, it should be strictely identical....not 
>> another one with similar brightness.I mean for instance if the pattern 
>> is 10x10 size, and with 20 black dot, another pattern with same size 
>> and same number of dot is false, the dots should be at the same place...
>>
>>>> for instance here each different pattern will be filled with 
>>>> different colors : 
>>>> http://www.pointcarre.com/Tribune/imarticles/Unfill/GB_resum.html
>>> A quick one would be to define a sliding window and sum up all pixels 
>>> within this window. If the sum exceeds a certain threshold you know that
>>> you are within a very bright area.
> 
> 
> hum
> 
> you got the area to compare,
> 
> Do and bitwise XOR of the pixels or bytes as it seems to be B/W only
> if any result is non-zero you do not match - - exit and try next spot.
> 
> 
> This could be a bit like the search routine that a company that I worked 
> for in the late 70's did.
> 
> This was on an old 8080 micro - - so no real speed and files could be 
> large - - (for those days)
> 
> They did a search not for the first character but in effect the lease 
> common.
> 
> say you are searching for the word "exit" in a file.
> The code would start looking for the "e" and upon finding it, then check 
> for the next letter 'x' - - - do not find it then rest - - but keep 
> looking for the 'x' till it is found - - - then check if the next is the 
> 'i' and the next is the 't' and then check the letters at the start - 
> being sure that a match is found - - -
> 
> The same can apply here - - The concept is that this tends to look for 
> the lease common pattern or char - -
> 
> They found this had quite a bit of speed up in terms of operation.
> 
> 
> Jim P.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads