PureBasic Interface to OpenCV

Developed or developing a new product in PureBasic? Tell the world about it.
Philippe-felixer76-3
User
User
Posts: 45
Joined: Mon Dec 30, 2013 10:12 pm

Re: PureBasic Interface to OpenCV

Post by Philippe-felixer76-3 »

JHPJHP wrote:Hi Philippe-felixer76-3,
Are you going to maintain the link to the "License Plate Recognition" project or post the changes? If the latter - I will remove the link from the 1st post so as not to confuse anyone interested in testing your latest changes.
If i replace the zip file in my dropbox, does the link still exists and be valid?
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: PureBasic Interface to OpenCV

Post by JHPJHP »

Yes.

I had the same question when I first started this, and was happy to find out that I didn't need to recreate the link.

Note:
- when creating the new zip file make sure not to be logged into Dropbox, as it establishes a link to the original file, locking it from updates

Cheers!

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
Philippe-felixer76-3
User
User
Posts: 45
Joined: Mon Dec 30, 2013 10:12 pm

Re: PureBasic Interface to OpenCV

Post by Philippe-felixer76-3 »

JHPJHP wrote:Yes.

I had the same question when I first started this, and was happy to find out that I didn't need to recreate the link.

Note:
- when creating the new zip file make sure not to be logged into Dropbox, as it establishes a link to the original file, locking it from updates

Cheers!
Tnx, but i do appreciate AAT and your input a lot, that is a factor for me, motivating me.
AAT
Enthusiast
Enthusiast
Posts: 259
Joined: Sun Jun 15, 2008 3:13 am
Location: Russia

Re: PureBasic Interface to OpenCV

Post by AAT »

Hi, JHPJHP!
JHPJHP wrote:Anyone who would like to help resolve this latest batch of problems, I'd be more then happy to share my results.
PM me, i will try to take part in searches of a solution.
I think, the best way is to learn C source code. There are things and details which are not described in the manual.

Good luck!
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: PureBasic Interface to OpenCV

Post by JHPJHP »

Updated:
- added Constants, Structures, Macros, Functions, Inline Functions (converted to Procedures)
- updated Constants, Structures, Macros, Functions, Inline Functions
- added 1 example
-- le_delaunay.pb: iterative construction of delaunay triangulation and voronoi tessellation

NB*: The new example was converted from the file delaunay.c (included with the OpenCV 2.4.8 download).

This example took forever to get right, just ask AAT who helped by spotting some invalid Constants, and putting me on to Code::Blocks where I was able to view and debug a working example.

Thank you again AAT for the support, and the time you spent debugging both sets of code.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: PureBasic Interface to OpenCV -- 01/29/14 07:30 PM

Post by JHPJHP »

Updated:
- updated 1 Structure
-- updated all examples affected by the change
- updated 1 example
-- cv_ROI.pb: simulates zooming a section of a resized image by loading the Region Of Interest (ROI) for a given rectangle from the original image
- added 1 default image
- added 1 icon file
-- changed the icon for all examples

NB*: I noticed that the latest OpenCV binaries included with the latest Microsoft Runtime DLLs now work on Windows XP.
- I left the previous versions in the package just in case
Last edited by JHPJHP on Sat Feb 22, 2014 6:23 pm, edited 2 times in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
AAT
Enthusiast
Enthusiast
Posts: 259
Joined: Sun Jun 15, 2008 3:13 am
Location: Russia

Re: PureBasic Interface to OpenCV ---- 01/29/14 07:30 PM

Post by AAT »

Hi!

I found a strange thing: openCV program (exe) require the presence of all openCV libraries not only core, higui, imgproc. Why? It seems to me, that there was no this requirements in previous versions.

Update: Yes, i have tested my program compiled with openCV 2.47 it require only core, higui, imgproc libraries. the same program compiled with openCV 2.48 start to require all openCV libraries. This is no good...

Good luck!
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: PureBasic Interface to OpenCV ---- 01/29/14 07:30 PM

Post by JHPJHP »

Hi AAT,

http://www.purebasic.fr/english/viewtop ... 72#p433672
- if a function or functions are located in the legacy DLL then all the other DLLs are required
- for this reason I named examples that include legacy functions in the format of: le_*.pb

Can you confirm if a function you're using has moved from one of the main DLLs to the legacy DLLs since v2.47.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
AAT
Enthusiast
Enthusiast
Posts: 259
Joined: Sun Jun 15, 2008 3:13 am
Location: Russia

Re: PureBasic Interface to OpenCV ---- 01/29/14 07:30 PM

Post by AAT »

Hi, JHPJHP.

I found the source of this problem: this is the procedure
ProcedureC cvCreateSubdivDelaunay2D(...)
in includes.pbi

This procedure calls two functions from opencv_legacy248, so excess libraries (opencv_legacy248 and others) are needed even if i not using any functions from them in my program. :(
I commented out this procedure and my program ceased to demand excess libraries.
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: PureBasic Interface to OpenCV ---- 01/29/14 07:30 PM

Post by JHPJHP »

Updated:
- removed vc10 & vc11 binaries
- updated cv_ROI.pb example
- moved icon file to its own folder (\binaries\icons)
-- updated all the examples to reflect the change

I tested the examples with the latest binaries on a couple XP computers with no issues, so I removed the alternate binaries; the package is now less then half the previous size.

ROI example changes:
- added blur-out to original image
- added a translucent rectangle to the clicked area on the original image (Region Of Interest)

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: PureBasic Interface to OpenCV ---- 02/02/14 08:00 PM

Post by JHPJHP »

Updated:
- added Constants, Structures, Functions
- added 1 example
-- cv_cam_flow.pb: sparse optical flow technique using the Lucas-Kanade algorithm

Original Code: http://pastebin.com/6aVzdBkd

-----------------------------------------

Update:
- updated Functions
- cv_cam_flow.pb has been modified for better results / stability

Cheers!

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
AAT
Enthusiast
Enthusiast
Posts: 259
Joined: Sun Jun 15, 2008 3:13 am
Location: Russia

Re: PureBasic Interface to OpenCV ---- 02/04/14 06:00 PM

Post by AAT »

Hi, JHPJHP!
JHPJHP wrote: - cv_cam_flow.pb has been modified for better results / stability
Quite another matter! The example didn't worked yesterday for me at all . For now it works fine!
Thanks for persistence! Now it's possible to do the computer kapellmeister (conductor) :)

Good luck!
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: PureBasic Interface to OpenCV ---- 02/04/14 06:00 PM

Post by JHPJHP »

Now it's possible to do the computer kapellmeister
Sure, but providing he or she only has one arm. :)

------------------------------------------------------

Updated:
- added Constants, Structures, Macros, Functions
- renamed 1 example
-- cv_cam_flow.pb to cv_cam_flow_1a.pb
- added 1 example
-- cv_cam_flow_1b.pb: sparse optical flow technique using the Lucas-Kanade algorithm

Original Code: lkdemo.c - found in a previous version of OpenCV.

I liked this example when I started it, but after a few days of trying to figure out the conversion to PureBasic it got a bit tedious... enjoy.

Demonstration Video:
Image
Last edited by JHPJHP on Sun Apr 06, 2014 11:33 pm, edited 3 times in total.

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
AAT
Enthusiast
Enthusiast
Posts: 259
Joined: Sun Jun 15, 2008 3:13 am
Location: Russia

Re: PureBasic Interface to OpenCV ---- 02/04/14 06:00 PM

Post by AAT »

Hi, JHPJHP!

Very fun, thanks! If to change color of points pumpkin a Halloween will turn out in night-mode :D
User avatar
JHPJHP
Addict
Addict
Posts: 2251
Joined: Sat Oct 09, 2010 3:47 am

Re: PureBasic Interface to OpenCV ---- 02/04/14 06:00 PM

Post by JHPJHP »

Hi AAT,

Thanks for taking the time to comment... I've updated the last example to improve the tracking dots stability; changes based on the C++ example.

NB*: A little early (or late) for Halloween and pumpkin's, but why not. :)

Cheers!

If you're not investing in yourself, you're falling behind.

My PureBasic StuffFREE STUFF, Scripts & Programs.
My PureBasic Forum ➤ Questions, Requests & Comments.
Locked