Fabian1648 2 Posted May 21, 2020 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
Dave Nottage 563 Posted May 21, 2020 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
Vandrovnik 215 Posted May 22, 2020 Have you tried to use lower resolution and turn the light on? Share this post Link to post
Fabian1648 2 Posted May 22, 2020 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
flydev 1 Posted September 10, 2020 (edited) On 5/22/2020 at 12:03 AM, Fabian1648 said: 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... For reference, I managed last year to get the "autofocus" working on Android. You can check it on my repo there : - https://github.com/flydev-fr/ZXing.Delphi.Demo - https://github.com/flydev-fr/ZXing.Delphi.Demo/blob/master/AdvancedTestApp/uMain.pas#L487-L515 Edited September 10, 2020 by flydev typo 1 Share this post Link to post