Jump to content
TurboMagic

Android camera/exposure/GetScanLine/PixelFOrmat

Recommended Posts

Hello,

 

I want to use TCameraComponent on Android to capture images with a frame rate as high as possible
and search for something/detect something in the individual images.

 

Questions:

1. Is the exposure time of relevance there? If yes, how can I set that? I didn't see anything regarding that.

2. Which Android camera API does TCameraComponent use?

3. If I use .MAP on the obtained bitmap I get a TBitmapData object, where I can call GetScanLine on.
    Which TPixelFormat  do those bitmaps use? Is this the same format on all Android devices or how
    to set that?

 

Regards

TurboMagic

Share this post


Link to post
2 hours ago, TurboMagic said:

Which Android camera API does TCameraComponent use?

Camera 1 API, which has been deprecated for years. I have support for Camera 2 here: 

 

https://github.com/DelphiWorlds/Kastri/tree/master/Demos/Camera, but it sorely needs work.

 

I was hoping to use Camera X (part of Android X), but have hit issues with that:

 

https://github.com/DelphiWorlds/Playground/tree/main/Demos/CameraX

 

Continuous capture like you speak of is part of my goal, however it's low priority for me at the moment.

Share this post


Link to post

Regarding your support for Camera 2:

Can you got a bit more into details about what work it would need?
Does Camera API 2 have a setting for the exposure time? Have you surfaced that one or would it be easy to add it?

And why, oh why, does Android need so many different takes on a camera API?

 

Regards

TurboMagic

Share this post


Link to post
9 hours ago, TurboMagic said:

Can you got a bit more into details about what work it would need?

Take a look at the issues towards the bottom of this list: https://github.com/DelphiWorlds/Kastri/issues

Most are prefixed with [Camera]

9 hours ago, TurboMagic said:

Does Camera API 2 have a setting for the exposure time?

Yes

9 hours ago, TurboMagic said:

Have you surfaced that one

Not as yet

9 hours ago, TurboMagic said:

would it be easy to add it?

It's not trivial, but also not rocket science 🙂

9 hours ago, TurboMagic said:

And why, oh why, does Android need so many different takes on a camera API?

Camera X appears to be just a "convenience" layer over Camera 2, so there's really still only 2 "takes". For "lower level" stuff like controlling exposure they recommend Camera 2, so I may be sticking with that for now anyway.

Share this post


Link to post

Can you show on how to add this/implement this?

Problem is: without continous capture the thing is not usable for my purpose...

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

×