Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

So I found the Solution for both Errors now.

Low KeyPoint Value The fault I made was, to pass the Point Value of the KeyPoint to the calcOrientationHist(...) function, while I pass the Image Patch and not the Source Image of the KeyPoint. As the Paper says, the Origin/centre of each Image Patch should be the KeyPoint, so I passed the centre Point of the Image patch as Point to the function. After that I got a good Value of KeyPoints per scale Step.

Malloc Error To solve a Malloc Error I recommend for XCode Users to always activate the GuardMalloc feature for the Debugger. You can Access this Feature through the Run Options of your Application under the tab "Diagnostics". The Guard Malloc helps to find the exact Location where the Malloc Error is generated. Without it, it the Malloc Error will occur while running at Line which does not produce the mistake (like in my case line 207 was shown to throw the Error instead it was a completely other line). With a little bit more Debugging it showed, that The Error occured, because I tried to access a value of an array but the index was out of the Arrays bounds. (Temphist.size would be 38, it tried to access the value at 52). The Solution was, that the calculation of Bin was wrong instead of this: cvRound((n/360.f)+ori[k]it should be cvRound((n/360.f)*ori[k]so instead of the value 52 the result would be 8.8