Re: PureBasic Interface to OpenCV
Posted: Wed Sep 17, 2014 6:45 pm
Hi applePi,
The following quotes from the link you posted are a couple reasons why I like math facts - thank you:
- listed from top to bottom, not by effectiveness
Try changing the "shape" parameter:
Try changing the order, increasing/decreasing values, removing existing filters or adding additional filters:
Try changing the "mode" and/or "method" parameters:
Try without an area minimum, removing the "If" structure:
Something else that may improve results is adjusting zone size. Try using only vertical or horizontal slats depending on what area your camera is focused on, the string or weight.
NB*: I found a problem with the thread function, it was missing a delay which caused the CPU usage to max-out when the alarm wasn't activated.
-------------------------------------------------------------------------------------
Updated:
- renamed 1 example
-- cv_cam_chessboard.pb to cv_cam_chessboard_2.pb
- added 1 example
-- cv_cam_chessboard_1.pb: after finding the positions of internal corners for a 10 x 7 chessboard pattern, a video is embedded using a warping algorithm
I'm currently using an iPad to load the chessboard pattern from the following link: http://www.clipartbest.com/cliparts/RiA ... 5yoKiL.png, but a printed copy would work just as well.
- I've replaced the chessboard image included with the package with the one from the above link
NB*: The chessboard pattern needed for the examples [ cv_cam_chessboard_1.pb ] and [ cv_cam_chessboard_2.pb ] to work, must match the configuration 10 x 7.

The following quotes from the link you posted are a couple reasons why I like math facts - thank you:
I'm not sure if you're going to spend anymore time on this, but there are numerous ways to improve the sensitivity for detecting objects.All simple pendulums should have the same period regardless of their initial angle (and regardless of their masses).
...
The period for a simple pendulum does not depend on the mass or the initial angular displacement, but depends only on the length of the string.
- listed from top to bottom, not by effectiveness
Try changing the "shape" parameter:
Code: Select all
*kernel.IplConvKernel = cvCreateStructuringElementEx(3, 3, 1, 1, #CV_SHAPE_RECT, #Null)
Code: Select all
cvErode(*imgSilhouette, *imgSilhouette, *kernel, 1)
cvDilate(*imgSilhouette, *imgSilhouette, *kernel, 2)
cvErode(*imgSilhouette, *imgSilhouette, *kernel, 1)
Code: Select all
nContours = cvFindContours(*imgSilhouette, *storage, @*contours, SizeOf(CvContour), #CV_RETR_EXTERNAL, #CV_CHAIN_APPROX_NONE, 0, 0)
Code: Select all
If area >= 500
NB*: I found a problem with the thread function, it was missing a delay which caused the CPU usage to max-out when the alarm wasn't activated.
-------------------------------------------------------------------------------------
Updated:
- renamed 1 example
-- cv_cam_chessboard.pb to cv_cam_chessboard_2.pb
- added 1 example
-- cv_cam_chessboard_1.pb: after finding the positions of internal corners for a 10 x 7 chessboard pattern, a video is embedded using a warping algorithm
I'm currently using an iPad to load the chessboard pattern from the following link: http://www.clipartbest.com/cliparts/RiA ... 5yoKiL.png, but a printed copy would work just as well.
- I've replaced the chessboard image included with the package with the one from the above link
NB*: The chessboard pattern needed for the examples [ cv_cam_chessboard_1.pb ] and [ cv_cam_chessboard_2.pb ] to work, must match the configuration 10 x 7.
