You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,13 +27,12 @@ Algorithm description
27
27
1. Start in the image top center `(x,y) = (Screen width / 2, 0)`
28
28
2. Move down by incrementing Y untill we find pixel with the value 'brighter' than certain grey shade threshold value
29
29
1. If we have reached the center without finding any bright pixel, stop processing the image else, save the position of the first 'bright' pixel we have found into the `track_start`
30
-
3. Rotate `track_start` counterclockwise and save rotation result into pnew. Whenever it is light enough, write the sample into the wav file and proceed with rotation. If pnew is not light enough, there is a couple of possibilities of us having:
30
+
3. Rotate `track_start` counterclockwise and save rotation result into `pnew`. Whenever it is light enough, write the sample into the wav file and proceed with rotation. If `pnew` is not light enough, there is a couple of possibilities of us having:
31
31
1. strayed off the track into the dark zone between the tracks (most frequent case):
32
-
1. in this case we twiggle start point 2 pixels up and rotate -> this will result into rotated point to be a bit more far away form the center and might move us back on track. If it didn't and we are still on the dark spot:
32
+
1. in this case we twiggle start point 2 pixels up and rotate -> this will result into rotated point to be a bit more far away form the center and might move us back on track. If it didn't and we are still on the dark spot:
33
33
2. twiggle start point 2 pixels down and rotate -> this will move our pixel a bit closer to the center. If it didn't, proceed to the next case:
34
34
2. have reached the end of the track (dark circle in the middle of the plate):
35
-
1. move 30 pixels towards the plate center - if all of the pixels are dark, assume that we have reached the end
36
-
of the plate and stop processing. If it is not the end, proceed to the next case:
35
+
1. move 30 pixels towards the plate center - if all of the 30 sampled pixels are dark, assume that we have reached the end of the plate and stop processing. If it is not the end, proceed to the next case:
37
36
3. encountered a very dark bump on the track and the algoritm considered it to be 'off track' value. Add the value
38
37
to the sample file as if it was light enough
39
38
4. After we have reached the end of the plate, prepend the wav header with the amount of samples we have written to the beginning of the sample file.
0 commit comments