DCTNet icon indicating copy to clipboard operation
DCTNet copied to clipboard

Do you transform the images from BGR to YCbCr color space?

Open majian-stu opened this issue 4 years ago • 2 comments

Hi! Do you transform the images from BGR to YCbCr color space before converting them to the frequency domain? As you have mentioned in your paper, “Then images are transformed to the YCbCr color space and converted to the frequency domain (DCT transform in Figure 2)." But I cannot find any operation that transforms the image from BGR to YCbCr in your open-source code, and you feed the BGR images to the function "transform_dct" directly. I'm not sure if I missed any details. I hope you can help me.

majian-stu avatar Nov 29 '20 09:11 majian-stu

Same question. I found there is a parameter called 'backend' in class DatasetFolderDCT, which is used to control whether to load YCrCb image. But I noted the parameter is set to default as 'opencv', which means load BGR image. Then I can not find where BGR image is converted to YCrCb. Could you please give some details? Thanks very much.

jiaozizhao avatar Feb 10 '21 15:02 jiaozizhao

You can find the DCT processing in the TransformUpscaledDCT(object) class in cvtransforms.py file.

J-JunChen avatar Sep 29 '21 05:09 J-JunChen