Jump to content
Sign in to follow this  
Fabian1648

[Android][CameraComponent] How do I get a sharp image with Autofocus or other?

Recommended Posts

Hi everyone,

 

Context: Development of an Android app with FMX that requires a smartphone to take a picture of a label and then extract data from the image.

 

My problem: I use the CameraComponent and it's a pain to get an image that doesn't look like an artistic blur. Big problem with focusing.


1. As we are used to from Embarcadero, we have a lot of poor documentation. Thanks again to Embarcadero for the help indicating "Embarcadero Technologies has no further information at this time. Please help us document this topic using the Discussion page!"


2. With a "CameraComponent1.FocusMode := FMX.Media.TFocusMode.AutoFocus" the image is permanently blurred.

 

3. With a "CameraComponent1.FocusMode:= FMX.Media.TFocusMode.ContinuousAutoFocus", the image is sharp from time to time and the rest of the time, the image returned by the camera shows a focusing that is searching but... not finding the right setting.

 

4. There doesn't seem to be a Macro mode (which would indicate to the FocusMode that you are limited to close-ups).


Has anyone experienced this problem before? What would be the best approach to solve this problem? Create a Macro mode? Create a manual focus by indicating a limited area of the image that needs to be "focused"?

 

Any ideas and opinions are welcome...

 

Share this post


Link to post
1 hour ago, Fabian1648 said:

What would be the best approach to solve this problem?

One way would be to use something other than the camera component in Delphi. Although it may need some work, you could try my camera project: 

 

  https://github.com/DelphiWorlds/Camera

 

I am reviving the project, however that may be some time away, so you might want to consider something else, like WinSoft's:

 

  https://www.winsoft.sk/acamera.htm

Share this post


Link to post
9 hours ago, Vandrovnik said:

Have you tried to use lower resolution and turn the light on?

Yes, it is not a problem of resolution or light. The focusing is very too long to be acceptable and depends certainly of the smartphone model.

 

Is it not possible to help the focusing (for exemple with the definition of a specific area in the image given by camera)?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×