sangwoo3 / cvblob

Automatically exported from code.google.com/p/cvblob
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Problem with signed char, cvLabel hangs #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I am using cvblob on an ARM processor, and I discovered a bug in the code. It 
seems ARM uses an unsigned char by default, while x86 uses signed char.

This leads to an infinite loop in the contour-finding loop in cvLabel.

Specifically, in cvlabel.cpp, on lines 34 and 40, I changed
const char movesE ...
const char movesI ...

to

const signed char movesE ...
const signed char movesI ...

And now it seems to work. However, I haven't yet checked the rest of the code 
for problems. Perhaps a solution would be to change the Makefile to compile 
with '-fsigned-char'.

Original issue reported on code.google.com by radicaln...@gmail.com on 24 Jun 2011 at 3:11

GoogleCodeExporter commented 8 years ago
Hi!

Thank you very much for the report and for the solutions. I will consider both 
solutions.

Original comment by grendel....@gmail.com on 24 Jun 2011 at 7:29

GoogleCodeExporter commented 8 years ago
I confirm what has been said by grendel....@gmail.com. I had the same problems 
and his workaround helped!
Thank you very much grendel!
cheers
s.

Original comment by montanar...@gmail.com on 25 Nov 2011 at 5:56

GoogleCodeExporter commented 8 years ago
I also had the same problem! thanks all!

Original comment by andrewssobral on 1 Feb 2012 at 5:59

GoogleCodeExporter commented 8 years ago
Similar issue for ARM (et al.?) processors,

cvBlob/cvcontour.cpp , line 84:

change 

  const char cvChainCodeMoves[8][2] = { { 0, -1},

to

  const signed char cvChainCodeMoves[8][2] = { { 0, -1},

(loses the sign on ARM which causes problems later)

Cheers,

Doug

Original comment by news.obs...@gmail.com on 22 Dec 2012 at 8:13

GoogleCodeExporter commented 8 years ago
Thanks so much for pointing out the bug in cvLabel for ARM processors. I had 
given up on my Raspberry Pi ever working with cvBlob. I should have read this 
issue and saved myself hours of troubleshooting! It fixed the problem I had 
with cvLabel. Brilliant! Thanks.

Original comment by gary.a.s...@gmail.com on 8 Feb 2013 at 9:43

GoogleCodeExporter commented 8 years ago
Thank you very much for this fix, you have saved my graduation! However this 
fix should be mainstreamed into the source code, and not have to make future 
users have to find the fix through Google.

Original comment by seesemic...@gmail.com on 24 Mar 2013 at 3:22

GoogleCodeExporter commented 8 years ago
Hello someone please help me regarding cross compilation of cvBlob for arm.I 
stucked on it for many days.
Thanks in advance

Original comment by anaysona...@gmail.com on 28 Mar 2013 at 8:14

GoogleCodeExporter commented 8 years ago
Thank you so much for the workaround!

Original comment by iquewe...@gmail.com on 18 Nov 2013 at 9:46

GoogleCodeExporter commented 8 years ago
OMG thank you very much!! I was in the same situation as gary now, i finally 
have something working on my Raspberry Pi =D 

Original comment by dosreisj...@gmail.com on 16 Jan 2014 at 4:29

GoogleCodeExporter commented 8 years ago
Thank you so much!

Original comment by davide.c...@gmail.com on 1 Aug 2014 at 10:19