HMS-Core / hms-ml-demo

HMS ML Demo provides an example of integrating Huawei ML Kit service into applications. This example demonstrates how to integrate services provided by ML Kit, such as face detection, text recognition, image segmentation, asr, and tts.
https://developer.huawei.com/consumer/en/hms/huawei-mlkit?ha_source=hms1
Apache License 2.0
357 stars 120 forks source link

Is it possible to compress the yuv data in onPreviewFrame() #37

Open edisonlao opened 3 years ago

edisonlao commented 3 years ago

I found that when set Camera's preview size of 320 240, the speed of face recognition will much faster than set Camera's preview size of normal phone resolution like 1920 1080, by the way, the preview quality of Camera will be very low. so, is it possible to compress the yuv data in LensEngine's inner class LensPreviewer's onPreviewFrame() method? i'm trying to compress the yuv data without changing the parameters of Camera, in order to Improve the speed of face recognition and keep high quality of Camera's preview

I'm still trying, so if anyone thinks this is a feasible approach, please give me a hint thanks you~

HMS-MLKit commented 3 years ago

Of course, this is a feasible method. But you can't compress the yuv data in LensEngine. You can try to use your own camera control code to do this.

Mouadabdelghafouraitali commented 2 years ago

@edisonlao did you find any solution for this issue?