PureBasic Forum
https://www.purebasic.fr/english/

PureBasic Interface to OpenCV
https://www.purebasic.fr/english/viewtopic.php?f=12&t=57457
Page 55 of 55

Author:  bbanelli [ Fri Dec 14, 2018 1:39 pm ]
Post subject:  Re: PureBasic Interface to OpenCV

JHPJHP is live and kicking!!! :) :) :)

Thank you so much for maintenance!

Bruno

Author:  JHPJHP [ Sun Dec 16, 2018 9:35 pm ]
Post subject:  Re: PureBasic Interface to OpenCV

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!

Author:  AAT [ Tue Dec 25, 2018 2:56 pm ]
Post subject:  Re: PureBasic Interface to OpenCV

JHPJHP, Merry Christmas!
I wish you health, good luck and new interesting projects!
:D

Author:  JHPJHP [ Wed Dec 26, 2018 4:23 am ]
Post subject:  Re: PureBasic Interface to OpenCV

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.

Author:  JHPJHP [ Sun Mar 10, 2019 4:22 am ]
Post subject:  Re: PureBasic Interface to OpenCV

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.

Author:  JHPJHP [ Sat Mar 30, 2019 1:35 am ]
Post subject:  Re: PureBasic Interface to OpenCV

Hi Michael Vogel,

Question taken from this post: https://www.purebasic.fr/english/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.

Author:  Michael Vogel [ Sat Mar 30, 2019 10:20 am ]
Post subject:  Re: PureBasic Interface to OpenCV

Cool JHPJHP, will take a look at this very soon :wink:

Author:  JHPJHP [ Fri Oct 04, 2019 9:55 pm ]
Post subject:  PureBasic Interface to OpenCV

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.

Author:  Mesa [ Thu Oct 24, 2019 10:09 am ]
Post subject:  Re: PureBasic Interface to OpenCV

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:
"hAPI = TesseractInit(#PSM_AUTO, #OEM_TESSERACT_ONLY, #PB_Compiler_FilePath + "binaries/tesseract/tessdata/", "eng", #Null$)"

into
Code:
"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:
" 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.

Author:  JHPJHP [ Fri Oct 25, 2019 11:47 pm ]
Post subject:  PureBasic Interface to OpenCV

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.

Author:  collectordave [ Tue Apr 07, 2020 12:01 pm ]
Post subject:  Re: PureBasic Interface to OpenCV

May Have been answered.

Can the opencv interface be used with the MAC?

For example the canny edge detection?

CD

Author:  AAT [ Sun Apr 12, 2020 6:36 am ]
Post subject:  Re: PureBasic Interface to OpenCV

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:

Author:  collectordave [ Mon Apr 13, 2020 4:53 am ]
Post subject:  Re: PureBasic Interface to OpenCV

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?

Author:  AAT [ Mon Apr 13, 2020 11:43 am ]
Post subject:  Re: PureBasic Interface to OpenCV

Hi, collectordave

Quote:
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.

Page 55 of 55 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/