Page 55 of 60

Re: PureBasic Interface to OpenCV

Posted: Fri Dec 14, 2018 1:39 pm
by bbanelli
JHPJHP is live and kicking!!! :) :) :)

Thank you so much for maintenance!

Bruno

Re: PureBasic Interface to OpenCV

Posted: Sun Dec 16, 2018 9:35 pm
by JHPJHP
Hi bbanelli,

Thank you for your kind words.
bbanelli wrote:Thank you so much for maintenance!
I am again feeling the coding bug, and maintenance was just the thing to clear out the cobwebs.

I've just posted a new OpenCV plus application, that will capture and record a users window actions to an AVI video file: Record Window
- can also be configured as a PureBasic Tool

Cheers!

Re: PureBasic Interface to OpenCV

Posted: Tue Dec 25, 2018 2:56 pm
by AAT
JHPJHP, Merry Christmas!
I wish you health, good luck and new interesting projects!
:D

Re: PureBasic Interface to OpenCV

Posted: Wed Dec 26, 2018 4:23 am
by JHPJHP
Hi AAT,
AAT wrote:JHPJHP, Merry Christmas!
I wish you health, good luck and new interesting projects!
Thank you my friend.

Have a very Merry Christmas and a Happy New Year.

NB*: I will probably just continue creating small applications around the OpenCV interface; there are so many possibilities.

Re: PureBasic Interface to OpenCV

Posted: Sun Mar 10, 2019 4:22 am
by JHPJHP
Updated:
- added back the Microsoft Visual C++ Runtime Libraries to the various Windows packages
-- originally suggested by acreis in this post

cvCreateVideoWriter Windows examples now set to use the XVID codec.
- install: only the DIVX option is required
- START > XVID > Encoder Config > Other Options... > Display encoding status (remove checkbox)

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

Removed DPI Awareness functions from the Windows packages.
- switched to Windows API instead of using PureBasic's built-in ExamineDesktops

NB*: Multiple global find/replace calls were performed with limited testing; please report any problems.

Re: PureBasic Interface to OpenCV

Posted: Sat Mar 30, 2019 1:35 am
by JHPJHP
Hi Michael Vogel,

Question taken from this post: viewtopic.php?p=534605#p534605
Michael Vogel wrote:Seems that the OpenCV libraries are doing a lot of stuff...

Some days ago I started to write a simple stretch function to be used as an external program for the Faststone Viewer to correct the perspective of photos. It uses the magick library (parameter -distort Perspective) for now but the lib is very large for this tiny stuff...

...can you tell me how to do a simple stretch for calculating a trapezium to a rectangle (or vice versa)?
Download the following OpenCV package from my website: OpenCV_2.4.13.6_WIN_32_SRC_(main)
- obviously the entire interface isn't necessary, but that can be worked out later if you decide to go the OpenCV route

See the following examples:
- cv_warpperspective_1.pb, cv_warpperspective_2.pb

This should get you started, but if you need additional help please don't hesitate to post back.

Re: PureBasic Interface to OpenCV

Posted: Sat Mar 30, 2019 10:20 am
by Michael Vogel
Cool JHPJHP, will take a look at this very soon :wink:

PureBasic Interface to OpenCV

Posted: Fri Oct 04, 2019 9:55 pm
by JHPJHP
Updated (Linux Packages):
- fixed a path problem
- fixed the webcam examples
- fixed window close event

Path Problem
After updating to Ubuntu 18.04.2 LTS (Bionic Beaver) none of the examples worked.

Webcam Examples
Before today I did not have a fully functional (VMWare) webcam; testing the webcam examples was non-existent.

Window Close Event
Programmatically closing one window to open another would exit the main loop.

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

Updated:
- patched the webcam examples (all packages)

Webcam Examples
I was trying to force a size restriction, not taking into account the scale factor.
Changed the way the webcam is attached; while working with two webcams I noticed a problem.

Re: PureBasic Interface to OpenCV

Posted: Thu Oct 24, 2019 10:09 am
by Mesa
Hi,

It's about your Tesseract example.

When i compile the cv_OCR_confidence.pb file, everything works fine.
But when i want to use the french language, i've got an error.

I downloaded the "fra.traineddata" from github (https://github.com/tesseract-ocr/tesser ... Data-Files) in the "ocr\binaries\tesseract\tessdata\" path

I changed the line

Code: Select all

"hAPI = TesseractInit(#PSM_AUTO, #OEM_TESSERACT_ONLY, #PB_Compiler_FilePath + "binaries/tesseract/tessdata/", "eng", #Null$)"
into

Code: Select all

"hAPI = TesseractInit(#PSM_AUTO, #OEM_TESSERACT_ONLY, #PB_Compiler_FilePath + "binaries/tesseract/tessdata/", "fra", #Null$)"
and the compiler displays an invalid memory access in the line

Code: Select all

" If TessBaseAPIInit1(hAPI, dictionarypath, language, OEM, @CFG, 1) : TessBaseAPIEnd(hAPI) : Else : ProcedureReturn hAPI : EndIf"
in the pb_tesseract.pb file

An idea, to change the language ?

Thanks.

Mesa.

PureBasic Interface to OpenCV

Posted: Fri Oct 25, 2019 11:47 pm
by JHPJHP
Hi Mesa,

I believe this is the same issue Morty posted awhile back...

… The memory access error is due to an incompatible traineddata version; download the required language file from the following link: Data Files for Version 3.02

NB*: Another option is to replace the binaries with the current version, but then you might have to update parts of the code.

Re: PureBasic Interface to OpenCV

Posted: Tue Apr 07, 2020 12:01 pm
by collectordave
May Have been answered.

Can the opencv interface be used with the MAC?

For example the canny edge detection?

CD

Re: PureBasic Interface to OpenCV

Posted: Sun Apr 12, 2020 6:36 am
by AAT
Hi, collectordave.
You should read the first post in this thread, download OpenCV_2.4.13.6_OSX_64_SRC_(main).zip from JHPJHP's My PureBasic Stuff and voila - you have get cv_canny.pb example.
It is very simple, right? :wink:

Re: PureBasic Interface to OpenCV

Posted: Mon Apr 13, 2020 4:53 am
by collectordave
Hi AAT

I have read the first post and have downloaded the CV_Canny.pb which does not run on my MAC.

Sorry the question still stands.

Can OpenCV be used on the MAC?

Re: PureBasic Interface to OpenCV

Posted: Mon Apr 13, 2020 11:43 am
by AAT
Hi, collectordave
I have read the first post and have downloaded the CV_Canny.pb which does not run on my MAC.
Are you downloaded only CV_Canny.pb ?
You need to download and install the entire package. For everything to work properly, libraries and function prototypes are needed.
collectordave wrote:Can OpenCV be used on the MAC?
I think you can use opencv on the MAC.
Read these articles https://www.learnopencv.com/?s=mac+os

I use Windows, so I can't give advice on installing opencv on Mac OS.

Re: PureBasic Interface to OpenCV

Posted: Sat May 30, 2020 3:50 pm
by JHPJHP
Hi AAT (my friend),

Sorry, I should have responded to your last/deleted post before now, but I was formulating an idea for a simple OpenCV program based on this post by netmaestro, and wanted to get your thoughts.

See the following two examples as the base for my idea (should make the return of Vector Curves that much easier):
- cv_approxpoly_1.pb (one of our first joint examples)
- cv_bezier_curve.pb

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

Updated:
- modified the webcam examples in all packages (Windows, Linux, OSX)