Class YuvToRgbConverter

  • All Implemented Interfaces:

    
    public final class YuvToRgbConverter
    
                        

    Helper class used to convert a Image object from ImageFormat.YUV_420_888 format to an RGB Bitmap object, it has equivalent functionality to https://github .com/androidx/androidx/blob/androidx-main/camera/camera-core/src/main/java/androidx/camera/core/ImageYuvToRgbConverter.java

    NOTE: This has been tested in a limited number of devices and is not considered production-ready code. It was created for illustration purposes, since this is not an efficient camera pipeline due to the multiple copies required to convert each frame. For example, this implementation (https://stackoverflow.com/questions/52726002/camera2-captured-picture-conversion-from-yuv-420-888-to-nv21/52740776#52740776) might have better performance.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit yuvToRgb(Image image, Bitmap output)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait