Page 7 of 60
Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 11:55 am
by Kwai chang caine
Wooowww !!! again more impressive i imagine !!!
Perhaps it's again my fault
But i have found an error "incorrect number of parameter" in line 50 in cv_pbimage_1.pb and cv_pbimage_2.pb
Code: Select all
cvSave(xmlPath + xmlName + "_keypoints.xml", *keypoints, #NULL$, #NULL$, #Null)
Again thanks to your useful job

Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 12:02 pm
by AAT
Hi, JHPJHP
JHPJHP wrote:...Some new functions have been REM'd out - there in the documentation, but not included in the DLL?...
I have found these functions in "core_c.h": they are "inline" functions.
I'll think over your new examples and will try comparison of contours.
Thank you!
Good luck!
Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 12:24 pm
by AAT
Kwaï chang caïne wrote:
But i have found an error "incorrect number of parameter" in line 50 in cv_pbimage_1.pb and cv_pbimage_2.pb
Code: Select all
cvSave(xmlPath + xmlName + "_keypoints.xml", *keypoints, #NULL$, #NULL$, #Null)
You have to comment (remove) these lines:
Code: Select all
xmlPath.s = GetPathPart(FileName)
xmlName.s = GetFilePart(FileName, #PB_FileSystem_NoExtension)
cvSave(xmlPath + xmlName + "_keypoints.xml", *keypoints, #NULL$, #NULL$, #Null)
cvSave(xmlPath + xmlName + "_descriptors.xml", *descriptors, #NULL$, #NULL$, #Null)
Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 12:33 pm
by Kwai chang caine
Thanks AAT

Know you a simple way with OpenCV, for have the same result of this site using pHash lib, or it's too difficult ?
http://phash.org/demo/
Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 1:58 pm
by AAT
Sorry, i'm not specialist in image processing.
I think there is no sense to try to achieve the results of phash.org with openCV, rather you have to write PB interface to this lib (if you want).
Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 2:21 pm
by Kwai chang caine
No no it's not my question

I just ask if it's possible, to do the same thing with OpenCV and the splendid work of JHPJHP, than what do the site of pHash..
So comparison of two picture, and say a percent of similarity, or a number of differences, etc..
In fact the same behaviour of the site, but with OpenCV
Perhaps begin with the "cv_contours_1.pb" ???
or perhaps "le_contours_6a"...
What is the better way ??
Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 2:40 pm
by AAT
Look at \openCV\sources\samples the examples with keyword "features", or le_SURF.pb in JHPJHP examples.
Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 2:53 pm
by JHPJHP
Hi Kwaï chang caïne,
Thank you for pointing out the error in the two examples... they are now fixed.
---------------------------------
Hi AAT,
Thank you for the information concerning the inline functions - I will look into it.
Cheers!
Re: PureBasic Interface to OpenCV
Posted: Wed Jan 08, 2014 3:09 pm
by Kwai chang caine
Look at \openCV\sources\samples the examples with keyword "features", or le_SURF.pb in JHPJHP examples.
Thanks AAT i regards this way
Thank you for pointing out the error in the two examples... they are fixed now.
No no, it's me i thanks for this great job

Re: PureBasic Interface to OpenCV
Posted: Fri Jan 10, 2014 7:05 am
by JHPJHP
Updated:
- added Constants, Structures, Macros, Inline Functions (converted to Procedures)
- added 1 example
-- cv_mov_text.pb: draws text to a movie file and saves it as an AVI (Audio Video Interleaved)
The new example was derived from the following post by normeus:
http://www.purebasic.fr/english/viewtop ... 13&t=57922
Re: PureBasic Interface to OpenCV
Posted: Fri Jan 10, 2014 11:13 pm
by Philippe-felixer76-3
Philippe-felixer76-3 wrote:
I find this interesting also.
There is no progress with SVM and OCR. You can test code without recognition. Test pictures (from internet) on
http://rghost.ru/51414957
Hi, i made a very plain OCR engine way back in 2008, and i picked it up again and it seems to be the perfect solution for this job.
Any interest?
Re: PureBasic Interface to OpenCV
Posted: Sat Jan 11, 2014 12:24 am
by AAT
Philippe-felixer76-3 wrote:
Hi, i made a very plain OCR engine way back in 2008, and i picked it up again and it seems to be the perfect solutionfor this job
Any interest?
Hi Philippe-felixer76-3. Yes, it is interesting. Is your OCR made with openCV and PureBasic?
Re: PureBasic Interface to OpenCV
Posted: Sat Jan 11, 2014 10:44 am
by Philippe-felixer76-3
AAT wrote:Philippe-felixer76-3 wrote:
Hi, i made a very plain OCR engine way back in 2008, and i picked it up again and it seems to be the perfect solutionfor this job
Any interest?
Hi Philippe-felixer76-3. Yes, it is interesting. Is your OCR made with openCV and PureBasic?
It's purebasic only, i thought i lost it but then i scanned my external HD and found it again.
Im working on it to integrate it into your code.
Re: PureBasic Interface to OpenCV
Posted: Sat Jan 11, 2014 9:06 pm
by JHPJHP
Hi Philippe-felixer76-3,
Very interesting, your efforts are appreciated.
--------------------------------------
Updated
- added Constants, Functions, 1 Inline Function (converted to a Procedure)
- added 1 example (jointly contributed by AAT)
-- cv_approxpoly.pb: approximates a polygonal curve(s) with the specified precision
- added 1 default image
The example attempts to count the number of sides for each shape, illustrating the difference by outlining them in various colors. It's worth noting that cvApproxPoly is very precise, my fist attempt was to use an image download from the net, but the slightest imperfection in a line would count as another point, sometimes returning hundreds. I decided to create the image using MSPaint, even so - the arrows having 7 sides return 9 because of a slight variance to the contour.
--------------------------------------
Hi AAT,
The new example may be of some help with your current project. I don't think any one solution would suffice, but a combination of cvMatchShapes, cvApproxPoly, etc. with the OCR script Philippe-felixer76-3 is working on, may be enough to exact results.
Like I previously mentioned - cvApproxPoly is very precise, and may be able to narrow similar results to something useful.
Cheers!
Re: PureBasic Interface to OpenCV
Posted: Sun Jan 12, 2014 12:18 am
by Ziltch
I have been using OpenCV in BlitzMax and C++ for ages. Great to see your work here getting it working with purebasic.
I am getting POLINK errors using PB x64. I can see no x64 directory in the binaries directory.
Is this now only 32bit?