We are currently using the OverlayEffect in CameraX (Version 1.4.1) to overlay timestamp and geo-coordinates on the image. We have 2 different overlay effects. First effect only has CameraEffect.PREVIEW as target and second effect has CameraEffect.IMAGE_CAPTURE only. According to the addEffect documentation, it states that the IMAGE_CAPTURE as the only target is supported.
However, when we specify CameraEffect.IMAGE_CAPTURE as the only target for the OverlayEffect, we encounter an IllegalArgumentException, which mentions that only three specific target combinations are supported by the OverlayEffect(show in the image below).
Could you please clarify if this is bug or are we doing something wrong here?
Thank you for the clarification. We implemented the CameraEffect as you suggested, and it works well overall. However, we’ve run into an issue where the text is being drawn vertically instead of horizontally. From what I understand, this is because the canvas is created using the dimensions of the Bitmap, which inherits the camera’s orientation.
I believe we may need to apply the same sensor-to-UI coordinate conversion that we use for the overlay effect. We tried passing the PreviewView for this conversion, but it results in an error when attempting to capture an image.
Could you suggest the best way to draw the text in the correct orientation? I’ve attached the code and a screenshot for your reference.
--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/81717953-49f5-466d-9bba-a00de8e6b735n%40android.com.