我正在尝试使用openCV对从onPreviewFrame(byte[] rawData)返回的数组进行一些图像处理,我已经将字节数组转换为整数数组。我的问题是,如何将这个int数组转换为Iplimage或Mat?转换到新的Camera2会有什么好处吗?
我已经尝试了这种方法来转换数组。void ProcImage(int Width, int Height, int imageArray[]) {
public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {这将返回一个mat。如果将其转换为字节数组,则最大值为127,最小值为-128。我想将其转换为最小0和最大255。这有可能吗?
如果是这样的话,是怎么做的?我尝试编写一个for循环,并将128添加到字节数组中的每个元素中。虽然它会导致字节</e