Ask Your Question

Boba-Fett's profile - activity

2015-05-06 01:59:19 -0600 received badge  Popular Question (source)
2014-02-10 07:59:49 -0600 answered a question SimpleBlobDetection set blobColor Python

Hello again,

i tryed it with version 2.4.8 and i get the same error as above.

Blockquote

Python exception in "Blob_Detection.execute" - error: ........\opencv\modules\core\src\algorithm.cpp:654: error: (-5) Argument error: the setter method was called for the parameter 'blobColor' of the algorithm 'Feature2D.SimpleBlob', the parameter has unsigned char type, so it should be set by integer, unsigned integer, uint64, unsigned char, boolean, float or double value, but the setter was called with integer value in function cv::AlgorithmInfo::set

Blockquote

if i print the cv version with

print cv2.__version__

i get printet the version 2.4.8

Now i would look i the algorithm.cpp file, but i can´t find it because the directory structure is different

The path who is schowen in the error text does´t exist.

Can someone help me??

2014-01-11 17:55:19 -0600 answered a question SimpleBlobDetection set blobColor Python

Thank you for your fast response!!

That means that if i would download the newes version of opencv this bug was fixed??

2014-01-11 17:49:26 -0600 received badge  Critic (source)
2014-01-11 17:49:24 -0600 received badge  Supporter (source)
2014-01-11 17:49:20 -0600 received badge  Scholar (source)
2014-01-09 08:00:04 -0600 asked a question SimpleBlobDetection set blobColor Python

Hello,

for my Technician exam project i have to do a blobDetection with openCV in Python. I use the simpleBlobDetection algorithem. here a code sample

import cv2

  b = cv2.SimpleBlobDetector()

  #set parameter
  if GetValue('Blob_Detection.blob_color') == 0:
    b.setInt('blobColor',0)
  else:
    b.setInt('blobColor',255)
  b.setDouble('maxArea',GetValue('Blob_Detection.maxArea'))
  b.setDouble('maxCircularity',GetValue('Blob_Detection.maxCircularity'))
  b.setDouble('maxConvexity',GetValue('Blob_Detection.maxConvexity'))
  b.setDouble('maxInertiaRatio',GetValue('Blob_Detection.maxInertiaRatio'))
  b.setDouble('maxThreshold',GetValue('Blob_Detection.maxThreshold'))
  b.setDouble('minDistBetweenBlobs',GetValue('Blob_Detection.minDistbetweenBlobs'))
  b.setDouble('minRepeatability',GetValue('Blob_Detection.minRepeatability'))
  b.setDouble('minThreshold',GetValue('Blob_Detection.minThreshold'))
  b.setDouble('thresholdStep',GetValue('Blob_Detection.thresholdStep'))

  blob = b.detect(img)

To set the parameters whitout 'blobColor' works fine. But if i try to set the blobColor i get a strange error message.

cv2.error: ..\..\..\src\opencv\modules\core\src\algorithm.cpp:654: error: (-5) Argument error: the setter method was called for the parameter 'blobColor' of the algorithm 'Feature2D.SimpleBlob', the parameter has unsigned char type, so it should be set by i
nteger, unsigned integer, uint64, unsigned char, boolean, float or double value, but the setter was called with integer value

Python exception in "Blob_Detection.execute" - error: ..\..\..\src\opencv\modules\core\src\algorithm.cpp:654: error: (-5) Argument error: the setter method was called for the parameter 'blobColor' of the algorithm 'Feature2D.SimpleBlob', the parameter has unsigned char type, so it should be set by integer, unsigned integer, uint64, unsigned char, boolean, float or double value, but the setter was called with integer value

I tried different set methodes. But every time i get the same error. I don´t know where´s the mistake

Can someone help me???