2021
08-08
08-08
OpenCV实现图片编解码实践
原图:图像信息,可以看到图像是一个816*2100像素的图片:python代码:importcv2importnumpyasnpimportmatplotlib.pyplotaspltimg=cv2.imread('11.jpg',0)img1=img.astype('float')img_dct=cv2.dct(img1)img_dct_log=np.log(abs(img_dct))img_recor=cv2.idct(img_dct)recor_temp=img_dct[0:100,0:100]recor_temp2=np.zeros(img.shape)recor_temp2[0:100,0:100]=recor_tempprintrecor_temp.shapeprintreco...
继续阅读 >