boris-kz / CogAlg

This project is a Computer Vision implementation of general hierarchical pattern discovery principles introduced in README
http://www.cognitivealgorithm.info
MIT License
90 stars 42 forks source link

Why rng*2 - even number because p, p-_p ? #12

Closed Twenkid closed 3 years ago

Twenkid commented 5 years ago

It's not clear from the explanation in the header why * 2. I assume because a single comparison requires at least two comparands?

Lines 67-68, referring to rng2 - means rng*2 ?

 dP_ = deque()  # line y - 1+ rng2
 dbuff_ = deque()  # line y- 2+ rng2: _Ps buffered by previous run of scan_P_

https://github.com/boris-kz/CogAlg/blob/de001789fff4600b91b0ccf336844a4d47ebdb00/frame_dblobs.py#L19

boris-kz commented 5 years ago

Because comparison is bi-directional: with before- and after- pixels. Yes, rng2 = rng*2. Sorry, old comments.

On Thu, Sep 27, 2018 at 9:00 PM Todor Arnaudov notifications@github.com wrote:

It's not clear from the explanation in the header why * 2. I assume because a single comparison requires at least two comparands?

Lines 67-68, referring to rng2 - means rng*2 ?

dP = deque() # line y - 1+ rng2 dbuff = deque() # line y- 2+ rng2: _Ps buffered by previous run of scanP

https://github.com/boris-kz/CogAlg/blob/de001789fff4600b91b0ccf336844a4d47ebdb00/frame_dblobs.py#L19

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/boris-kz/CogAlg/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AUAXGf1zv_FGrLEfvikQD_taNyFS0TeOks5ufXTDgaJpZM4W9rvU .

Twenkid commented 5 years ago

Before and after + current, i.e. 3 pixels?

boris-kz commented 5 years ago

No, rng = 2 before + rng = 2 after. So, it's y == 3 when tuples ders2 are evaluated.

On Thu, Sep 27, 2018 at 9:08 PM Todor Arnaudov notifications@github.com wrote:

Before and after + current, i.e. 3 pixels?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boris-kz/CogAlg/issues/12#issuecomment-425288509, or mute the thread https://github.com/notifications/unsubscribe-auth/AUAXGYC2WSVIowIAByIs_fbvv15lErBwks5ufXZ3gaJpZM4W9rvU .

boris-kz commented 5 years ago

Sorry, it's y == 4, because y == 0 only initializes ders

On Thu, Sep 27, 2018 at 9:12 PM Boris Kazachenko boris.kz@gmail.com wrote:

No, rng = 2 before + rng = 2 after. So, it's y == 3 when tuples ders2 are evaluated.

On Thu, Sep 27, 2018 at 9:08 PM Todor Arnaudov notifications@github.com wrote:

Before and after + current, i.e. 3 pixels?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boris-kz/CogAlg/issues/12#issuecomment-425288509, or mute the thread https://github.com/notifications/unsubscribe-auth/AUAXGYC2WSVIowIAByIs_fbvv15lErBwks5ufXZ3gaJpZM4W9rvU .