Is there any way to integrate OpenCV with PHP?
Asked Answered
G

5

18

I am trying to develop an application with PHP.

There are two possible ways this application will be developed. The first one is to try to do something like www.picnik.com, image processing directly on the browser. The other is to develop CBIR (content-bases image retrieval) algorithms.

So, is it possible to send an image from a PHP script to an OpenCV program? Or even display the image being manipulated in real time?

Thanks.

Gregoor answered 15/2, 2011 at 11:12 Comment(0)
L
7

Doing a google search for 'php opencv' suggests - yes you can :)

This one looks decent. http://www.xarg.org/project/php-facedetect/ (I know it's specific to face detaction, but could be a good start-point for you).

Will only be doable if you're using your own server as needs lots of additional core stuff added.

Luigiluigino answered 15/2, 2011 at 11:43 Comment(1)
Coincidently a Google search for "opencv PHP" now brings up this page.Meloniemelony
R
5

OpenCV for PHP is a new pecl module. Needs a little work to be complete, but a lot of work is already done.

Raspberry answered 19/3, 2012 at 14:47 Comment(2)
@Spechal the author may not be active, but is still accepting pull requests.Raspberry
There is a new OpenCV for PHP library which looks pretty activeTowline
F
4

May be this is very late to answer. But it will be useful to someone who came to find it. Yes its possible to use OpenCV in PHP.

There is recently updated git helps you to develop it.

Open CV PHP and examples to refer OpenCV Examples. Main it helps to detect objects, faces, etc. Hope this is very useful one if you read the library properly. Its well known library for android apps which comes with image processing and realtime measurements.

Fetishism answered 10/3, 2021 at 5:26 Comment(0)
M
2

there is another PHP face detection class here:

Apparently it doesn't work 100% on every photo, probably to do with the angle of the face etc, but I've heard good reports on it. I'm thinking about using it on my next project.

Mudslinger answered 26/7, 2012 at 2:12 Comment(0)
P
0

Depends on both server restrictions and the target program. If server allows, you can run external programs and pass arguments to them.

These external programs are usually CLI programs, i.e., without GUI. Image would be passed as a path to an image file (rather than data about pixels), i.e., my_opencv_program -resize 1024x768 -infile /tmp/input.jpg -outfile /tmp/output.jpg.

Phosphide answered 15/2, 2011 at 11:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.