iT邦幫忙

0

CameraX Analysis setTargetResolution

  • 分享至 

  • xImage

我在用PreviewView配合CameraX Analysis做影像辨識,setTargetResolution設定為(2560,800)可是Analysis的ImageProxy.getImage.getWidth跟getHeight為(1280,400),image轉為byte[]的長度為768000。當我改用SurfaceView配合Camera的onPreviewFrame回傳的data[]長度為3072000,可以請問一下要怎麼樣才能設定CameraX的辨識率為(2560,800)呢?
CameraX:
https://ithelp.ithome.com.tw/upload/images/20210609/20136882e1VsRuKERC.jpg
https://ithelp.ithome.com.tw/upload/images/20210609/20136882SD0f0AVGFp.jpg
https://ithelp.ithome.com.tw/upload/images/20210609/201368826fCgpv3REe.jpg
YUV2Byte:
https://ithelp.ithome.com.tw/upload/images/20210609/20136882M0V2TIKOcn.jpg
https://ithelp.ithome.com.tw/upload/images/20210609/201368828nOiFQ7G4s.jpg
Log:
https://ithelp.ithome.com.tw/upload/images/20210609/20136882d3dJKHBShX.jpg
Camera:
https://ithelp.ithome.com.tw/upload/images/20210609/20136882Wkh62JMNtW.jpg
https://ithelp.ithome.com.tw/upload/images/20210609/20136882RW50bZReZO.jpg
Log:
https://ithelp.ithome.com.tw/upload/images/20210609/20136882ejqCJb2zE2.jpg

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答