Hough-Transformation crashes randomly
DragonRaider5
Posts: 13
in Propeller 1
Hey there,
I am currently working on a Hough-Transformation using a PX38A on a CMUCam4. I split the hough space in one degree parts over 6 cogs and I have written some SPIN code to combine the results to get the 4 most "ouststanding" lines. However for some reason my cog just crashes at some point while sending the data to the SPIN cog which collects the data from the other 6. I can fix this by commenting out some (quiet important) code in my function - but then I loose basicly the whole point of the program. Maybe you can find some memory organisation issues or sth. similiar, thanks in advance to everybody who takes the time to look over it
For the code please look at the attached file, _CAMERA_H_WIN equals the resolution on the x axis and _CAMERA_V_WIN equals the resolution on the y axis. If you got any further questions concerning my code or sth. else feel free to ask
Thanks again,
DragonRaider5
PS.: Ofc the code is not finished yet, but still it won't work if it doesn't even work like this. Here is the output I get in the serial terminal (its cutted to the point where it breaks at it simply is too much, but it's what I expected based on the input image):
I am currently working on a Hough-Transformation using a PX38A on a CMUCam4. I split the hough space in one degree parts over 6 cogs and I have written some SPIN code to combine the results to get the 4 most "ouststanding" lines. However for some reason my cog just crashes at some point while sending the data to the SPIN cog which collects the data from the other 6. I can fix this by commenting out some (quiet important) code in my function - but then I loose basicly the whole point of the program. Maybe you can find some memory organisation issues or sth. similiar, thanks in advance to everybody who takes the time to look over it
For the code please look at the attached file, _CAMERA_H_WIN equals the resolution on the x axis and _CAMERA_V_WIN equals the resolution on the y axis. If you got any further questions concerning my code or sth. else feel free to ask
Thanks again,
DragonRaider5
PS.: Ofc the code is not finished yet, but still it won't work if it doesn't even work like this. Here is the output I get in the serial terminal (its cutted to the point where it breaks at it simply is too much, but it's what I expected based on the input image):
Cog: 0, Angle: 1047, Length: 0, Score: 0 Cog: 0, Angle: 1047, Length: 1, Score: 0 Cog: 0, Angle: 1047, Length: 2, Score: 2 Cog: 0, Angle: 1047, Length: 3, Score: 2 Cog: 0, Angle: 1047, Length: 4, Score: 4 Cog: 0, Angle: 1047, Length: 5, Score: 4 Cog: 0, Angle: 1047, Length: 6, Score: 4 Cog: 0, Angle: 1047, Length: 7, Score: 4 Cog: 0, Angle: 1047, Length: 8, Score: 4 Cog: 0, Angle: 1047, Length: 9, Score: 4 Cog: 0, Angle: 1047, Length: 10, Score: 4 Cog: 0, Angle: 1047, Length: 11, Score: 4 Cog: 0, Angle: 1047, Length: 12, Score: 4 Cog: 0, Angle: 1047, Length: 13, Score: 4 Cog: 0, Angle: 1047, Length: 14, Score: 4 Cog: 0, Angle: 1047, Length: 15, Score: 4 Cog: 0, Angle: 1047, Length: 16, Score: 5 Cog: 0, Angle: 1047, Length: 17, Score: 4 Cog: 0, Angle: 1047, Length: 18, Score: 4 Cog: 0, Angle: 1047, Length: 19, Score: 8 Cog: 0, Angle: 1047, Length: 20, Score: 2 Cog: 0, Angle: 1047, Length: 21, Score: 2 Cog: 0, Angle: 1047, Length: 22, Score: 3 Cog: 0, Angle: 1047, Length: 23, Score: 3 Cog: 0, Angle: 1047, Length: 24, Score: 3 Cog: 0, Angle: 1047, Length: 25, Score: 3 Cog: 0, Angle: 1047, Length: 26, Score: 4 Cog: 0, Angle: 1047, Length: 27, Score: 4 Cog: 0, Angle: 1047, Length: 28, Score: 5 Cog: 0, Angle: 1047, Length: 29, Score: 12 Cog: 0, Angle: 1047, Length: 30, Score: 20 Cog: 0, Angle: 1047, Length: 31, Score: 20 Cog: 0, Angle: 1047, Length: 32, Score: 10 Cog: 0, Angle: 1047, Length: 33, Score: 13 Cog: 0, Angle: 1047, Length: 34, Score: 28 Cog: 0, Angle: 1047, Length: 35, Score: 24
spin
43K
Comments
I solved it - it crashed in my sort algorithm. I don't know why, but I won't bother anymore as I am shifting from SPIN to GCC and this is trouble enaugh ;D thx anybody!