使在Android上的ARCore上播放的视频变暗

时间:2018-10-17 07:39:07

标签: android augmented-reality arcore sceneform

我目前正在研究一个AR项目,该项目需要在扫描图像时播放视频。

我能够合并S=int(input()) for i in range(1,S+1): y=i+(i-1) if i%2!=0: print(*range(i,y+1)) elif i%2==0: print(*range(y,i-1,-1)) # Output: # 1 # 3 2 # 3 4 5 # 7 6 5 4 存储库中的AugmentedImagechromakeyvideo样本以成功呈现视频,但是我注意到正在播放的视频具有明显的高对比度。

我正在使用另一个问题here提供的自定义sceneform-android-sdk文件。

演示:

Original video screenshot screenshot from device

我尝试从.mat文件的alpha中减去,但是没有用。

我应该弄乱RGB部分吗?

请提供一些帮助!

1 个答案:

答案 0 :(得分:1)

  

有两个问题会使您的图像变暗: ColourSpace 抠像质量

  1. 正如我在下面的图像中看到的那样,视频对比度不高–错误的https://stackoverflow.com/a/28616832/2370138

尝试将其转换为sRGB或HDR10或DCI-P3 ,具体取决于您的Android操作系统版本和class Program { [DllImport("user32.dll")] static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); static readonly IntPtr HWND_TOPMOST = new IntPtr(-1); const uint SWP_NOSIZE = 0x0001, SWP_NOMOVE = 0x0002, SWP_SHOWWINDOW = 0x0040; [DllImport("kernel32.dll")] static extern IntPtr GetConsoleWindow(); static void Main() { IntPtr handle = GetConsoleWindow(); SetWindowPos(handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); Console.WriteLine($"Hello handle: {handle}"); Console.ReadLine(); } } / hardware

阅读这两篇有用的文章:ColourSpaceAndroid Color Management

Android Oreo Color Gamuts

enter image description here

    此外,低质量的抠像(alpha通道提取)可能会改变RGB的颜色和对比度。下图显示了alpha通道中可能有多少孔(在RGB中产生孔的原因,因为它是预乘的图像– RGB * A)。

enter image description here

您可能会提取低质量的Alpha,从而使图像看起来很糟。下图显示了高质量(干净)提取的Alpha通道(在software上与低质量(肮脏)提取的Alpha通道(在LEFT上)。

enter image description here