Why Tensorflow object detection API uses YUV420SP to ARGB8888 conversion

廉价感情. 提交于 2019-12-23 22:23:18

问题


So I got the tensorflow object detection API running on Android and I've noticed while going through the code that before processing frames taken from the camera they're is a conversion that goes like this in the CameraActivity.java :

    imageConverter =
            new Runnable() {
                @Override
                public void run() {
                    ImageUtils.convertYUV420SPToARGB8888(bytes, previewWidth, previewHeight, rgbBytes);
                }
            };

I tried to look it up and I only understood the difference between the two types but I couldn't figure why this conversion is necessary (or preferable)..

Is this conversion since it's happening in real time and for every frame going to affect the preview or the processing time ?

Any information or explanation is much appreciated even if it's basic

来源:https://stackoverflow.com/questions/50720286/why-tensorflow-object-detection-api-uses-yuv420sp-to-argb8888-conversion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!