Skip to content
This repository was archived by the owner on Jan 18, 2020. It is now read-only.

Conversation

@curioustushar
Copy link

add method crop Face to jpeg which return image with only face ( jpeg format )
Source :- http://www.codediesel.com/algorithms/face-detection-in-images-using-php/

add method crop Face to jpeg  which return image with only face ( jpeg format )
Source :- http://www.codediesel.com/algorithms/face-detection-in-images-using-php/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably it should be

imagecopy($canvas, $this->canvas, 0, 0, $this->face['x'], $this->face['y'], $this->face['w'], $this->face['w']);

@alex-topface
Copy link
Contributor

Hello guys! I'm interested in having this #23 merged in. Is there any possibility to have this done?
@mauricesvay @cse-tushar

@mauricesvay
Copy link
Owner

Hi @alex-topface, I'm not sure this function should be the responsibility of the face detection class. Is there a specific reason for adding it?

@alex-topface
Copy link
Contributor

Hi Maurice,
why do you think it shouldn't? It already has functions getFace to detect face and toJpeg to print the red border over the face.
In my project I'd like to compare faces. So I use this class for detecting them. But even if I manage to get face coordinates, I can't extract the face, becouse the canvas variable has the protected access.

As for me the best solution is to use the code that can extract the face to another file. I can place the new pull request that fixes the error I posted above and has the possibility to print the result (extracted face) eigther to std out, as it done for now, or to specified file.

Will you be able to accept such PR and create a new release tag?

Thanks, Alex.

@mauricesvay
Copy link
Owner

Alright, sounds ok. I'll merge and create a new release when you update the PR.

@alex-topface
Copy link
Contributor

Thanks!

@mauricesvay
Copy link
Owner

Fixed by #25

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants