I need to take a photo and focus between the shape boundaries. (similar to the image attached).
I would like to know if is it possible in corona to crop that specific shape and filter a person face shape?
Jump to content
Take a look at the last example on this page...
Yes that's the idea, i can place the camera on the rectangle background using shapeobject you guide me, but i can't place the white head/face outline over it while camera is capturing the image. Because the idea is the white head outline will behave as a border to focus the human face, take the picture and crop it after.
Is this possible to achieve?
Thank you @Brent, it works that way an object over another, so i can use it right as an outline guide.
Excuse me if i insist one more time on getting it all clear: What about cropping the photo as an irregular shape (face shape) ?
Please can you assist me on knowing the right method?
@Brent I am testing on android device, samsung galaxy sII.
Here is the code i am using to display an object on the screen while camera is on.
But seems that the object i put over (in this case an image with transparent background) doesn't appear when i test it on real device.
If i create the object inside the "if media.hasSource" statement it won't appear neither.
Please may you help.
What's happening, is that the device's native camera is being opened at the point when you call media.capturePhoto(). This is leaving the Corona app's environment and going to the device's phone thread. From the docs:
Opens a platform-specific interface to the device's camera. This function is asynchronous, meaning that it returns immediately so the calling code will continue to execute until the end of its scope; after that, the application will be suspended until the session is complete.
You won't be able to overlay a Corona display object over the camera view in this fashion. What you (I believe) want to do, is use the object.fill() API (as Brent referenced above) to have a "live feed" display object, and then overlay a Corona display object on that. See the below thread for more info on this:
Community Forum Software by IP.Board