This method is a modification of the ToothedSpiralSearch(int):bool, method.

/** Development method only.
* Initializing only, takes 10ms because
* allocating the <visited> matrix only, takes 8ms. Cut.
* Rest of the initialization process, rests, foundOrNotPresent, allFoundOrNotPresent, things take 0ms to compute.
* All cycles without actual computation inside take 2ms.
* Using HashSet as visited type, it uses up 250ms just to go through the cycles checking for visited pixels. Cut.
* Using (x % 31) * (y % 31) as hashcode makes it 700ms. OMG.
* Without the whole visited stuff. Going through still makes: 1.8ms :DD Use <visited> only for debugging pls.
* Accessing the colors of the captured image: 12.5ms. Ok this is where it rises, but nothing to do with this.
* Comparing color with the new per-byte comparator, and acessing the searchedColor more efficiently makes it: 30ms.
* Dang. Why does it do 30ms?
* After I figured it out that processing is somehow spookyly dependent on input video device capturing frequency..
* .. without CompareColor(): 14.5 ms @ 30 FPS ; 20 ms @ 5 FPS
* .. with CompareColor(): 25 ms @ 30 FPS ; 35 ms @ 5 FPS

Last edited Apr 13, 2011 at 4:34 PM by kovacshuni, version 1


No comments yet.