hey greg

since i am not able to get opencv work going neither on mrl nor on pyhton idle ,

but yes since the work cannot stop i have sucessfull tested my algo on matlab using foreground detector.

here is the image and i cant figure out open cv on mrl y god only knows!

detector working fine on opencv. 

but not getting idea of how to count the no of objects and the triiger arduino and write code in python for open cv

hoping for better things by 28 feb 2015 as its my testing date

and also figured out using using 2-3 cams on mrl 

GroG

9 years 9 months ago

Some fun with detector and find contours .. there should be a way to recombine the original image with the bounding boxes .. would have to poke around a bit - this is from combining just 2 jpgs ..

this as learned background

 

'and this as foreground

Some of the ambient noise can be filtered out with thresholding ... another technique is to pyramid down .. a nice trick with that is the search is much quicker for the next Find Contours filter if its pyramid down

hey greg 

pls check my final image processing algo

acquire video

convert into frames 

do background masking

foreground threshold

contours

check for no conturs

if no of contours > threshold 2

save frame for further analysis

opencv = Runtime.start("uv","OpenCV")
opencv.capture()
sleep(4) 
opencv.addFilter("Detector")
opencv.setDisplayFilter("Detector")
canny = opencv.getFilter("Detector") 
 
# changing parameters
canny.apertureSize = 3
canny.lowThreshold = 10.0
canny.highThreshold = 150.0
 
 opencv.stopCapture()
 
2435 [Thread-7] ERROR class org.myrobotlab.framework.Service  - Python error - ------SyntaxError: (mismatched input  ex
 
the above code is my starting in opencv
greg i would be happy to syntax of FindContours getting syntax errors

 

GroG

9 years 9 months ago

Try this to start...

it learns the background for the first 4 seconds .. then runs the detector in search mode .. and finds contours

[[/home/GroG/BasicForeGroundCapture.py]]