B4A Library OpenCV 3.x

JordiCP

Expert
Licensed User
Longtime User
Please send me a PM with a mail address.

As far as I know, you can use OpenCV 3.20 in B4J with inline Java (@moster67 made some successful tests), but not yet with my lib, since not only the binaries will change, but also the exposed modules are not exactly the same (they are platform dependant)
I have planned to look at it after my mini-vacations (next week I'll disconnect myself for one week), but can't promise anything
 

JordiCP

Expert
Licensed User
Longtime User
You could post it on a free sharing site such us THIS and avoid getting hammered with requests.
This first version was some kind of experiment for me, so I wanted to have it somehow "controlled", but in the end it has resulted to work very well. I'll make the link public with next release (v1.1 which will wrap OpenCv3.30)
 

JordiCP

Expert
Licensed User
Longtime User
thinking loud, probably next release will take a while, so I see no problem in sharing it already "as it is" (with some known bugs, but minor ones)

LINK PUBLISHED IN THE FIRST POST
 

Beimer Osorio

New Member
Licensed User
Hi,

I would like to ask you, how do I do the face detection by placing the front camera in portrait?

I am new at this.
 

JordiCP

Expert
Licensed User
Longtime User
The JavaCameraView object used in the example only works with the camera default orientation, that uses to be landscape.

So if you want to use portrait mode, some changes should be made to the code and use cameraEx class instead of JavaCameraView. I'll look at it this weekend and see if can be tuned 'easily'
 

Beimer Osorio

New Member
Licensed User
thanks for answering !!!

How do I use cameraExclass instead of JavaCameraView?

any ideas?

What I really need is to detect a face using the vertical orientation, then take a photo where the rectangle is seen on the person's face and store it. That is all.
any idea how to do it?
Your contribution is of great help to me,

how much is the donation?
 
Last edited:

JordiCP

Expert
Licensed User
Longtime User
I've tuned an example to make it work with front camera in portrait mode using CameraEx.

The detected face is marked with a green rectangle --> once it works for you it's easy to get the ROI (region of interest) of the picture in order to save it
 

Attachments

  • faceDetectorFrontPortrait.zip
    17.6 KB · Views: 894

JordiCP

Expert
Licensed User
Longtime User
A possible approach can be using backgroundsubstractor with a fixed cam and some logic to tune it. There is an example here in the forum to start with.
It could detect "moving persons" (or objects) and discard small animals based on the detected blobs size, and/or other criteria.
As with most of Opencv apps, the difficult part will be fine-tuning the details, but it seems feasible.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…