You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class CameraPreviewActivity extends Activity implements Camera.PreviewCallback {
private final String TAG = "rkyolo";
private static final int MAGIC_TEXTURE_ID = 10;
TSurfaceHolderCallback mSurfaceHolderCallback = null;
private Camera mCamera0 = null;
private SurfaceView mSurfaceView = null;
public SurfaceTexture mSurfaceTexture = null;
private SurfaceHolder mSurfaceHolder = null;
public int flip = -1; // for CAMERA_FACING_BACK(camera comes with RK3588 using this mode),
// we do not need flip, using -1, or we need using
// IM_HAL_TRANSFORM_FLIP_H
When I run this demo with an external USB camera on the 3588 board, the image is mirrored. I have tried modifying the parameter to -1, 0, 1, and IM_HAL_TRANSFORM_FLIP_H (public static final int IM_HAL_TRANSFORM_FLIP_H = (1 << 3); // 0x08), but none of these changes have any effect; the image remains mirrored. This includes the startCamera() method where the condition
if (Camera.CameraInfo.CAMERA_FACING_FRONT == camInfo.facing) {
this.flip = IM_HAL_TRANSFORM_FLIP_H;
}
does not work even when commented out.
The text was updated successfully, but these errors were encountered:
Starkguava
changed the title
rknn_yolov5_android_)apk_demo modifying the flip parameter does not take effect
rknn_yolov5_android_apk_demo modifying the flip parameter does not take effect
Oct 24, 2024
public class CameraPreviewActivity extends Activity implements Camera.PreviewCallback {
When I run this demo with an external USB camera on the 3588 board, the image is mirrored. I have tried modifying the parameter to -1, 0, 1, and IM_HAL_TRANSFORM_FLIP_H (public static final int IM_HAL_TRANSFORM_FLIP_H = (1 << 3); // 0x08), but none of these changes have any effect; the image remains mirrored. This includes the startCamera() method where the condition
if (Camera.CameraInfo.CAMERA_FACING_FRONT == camInfo.facing) {
this.flip = IM_HAL_TRANSFORM_FLIP_H;
}
does not work even when commented out.
The text was updated successfully, but these errors were encountered: