Hello,
i’m porting the imx214 camera on the Linux.
the kernel i use is as follow:
http://releases.linaro.org/96boards/dragonboard410c/linaro/debian/latest/
and after a lot of trial and error, i checked the screen at VRE_RDI.(bayer 10Bit)
i couldn’t see the image(dump) directly, so i could convert it to jpg using the code below.
import cv2
import numpy as np
w = 1920 #width
h = 1080 #height
bpp = 10 #bpp
blockSize = (int)(w*h*(bpp/8)) # file size
def convert_image(bayer):
pixline=[]
pixframe=[]
step =0
lineCount = 0
for x in range(0,len(bayer)):
pixline.append(bayer[step:step+4])
lineCount = lineCount + 4
step = step + 5
if(step >= len(bayer)):
pixframe.append(pixline.copy())
pixline.clear()
break
if(lineCount >= w):
pixframe.append(pixline.copy())
pixline.clear()
lineCount=0
#conv = np.uint8(np.array(pixframe))
conv = np.array(pixframe) #convert numpy array
conv = conv.reshape(h,w) #reshape
print(conv.shape[:2]) # print resolution
# bayer to RGB
src = cv2.cvtColor(conv, cv2.COLOR_BayerRG2RGB)
# show image
cv2.imshow("bayer10bit", src)
# wait any key
k = cv2.waitKey(0) & 0xFF
# write image
cv2.imwrite('test.jpg', src)
# load bayer image
img = np.fromfile("test.bay", np.uint8, blockSize, "")
convert_image(img)
Note that the code above is to discard the lower 2bits.
now i want to see it in VFE_PIX.
my question is whether VFE_PIX supports SRGGB10 input.
if possible, is there any document(or links) that can give a hint?
if not supported by Hardware, how should i approach it?
Thank you.