Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions about input raw image size #6

Open
GuoShi28 opened this issue Jan 7, 2020 · 0 comments
Open

Some questions about input raw image size #6

GuoShi28 opened this issue Jan 7, 2020 · 0 comments

Comments

@GuoShi28
Copy link

GuoShi28 commented Jan 7, 2020

Hi, this work is very interesting. When I testing the performance on my own captured image, I'm confused about the input shape of MMNet.

p = Demosaic(image_patch.float(), M_patch.float())
p.cuda_()
xcur = mmnet.forward_all_iter(p, max_iter=args.max_iter, init=args.init, noise_estimation=args.noise_estimation)

(1) In my testing, the size of image patch is (H, W) with rggb bayer pattern. The largest number of image patch should be 255.
(2) However, when I see the code in data_loader.py, the size of input seems to have size of H, W, 3.

image_mosaic = np.zeros(image_gt.shape).astype(np.int32)
image_mosaic[:, :, 0] = mask[..., 0] * image_input
image_mosaic[:, :, 1] = mask[..., 1] * image_input
image_mosaic[:, :, 2] = mask[..., 2] * image_input
#print(image_mosaic.dtype)
 image_input = np.sum(image_mosaic, axis=2, dtype='uint16')
# perform bilinear interpolation for bayer_rggb images
if self.apply_bilinear:
image_mosaic = self.preprocess(self.pattern, image_input)

image_gt = img_as_ubyte(image_gt)
image_input = image_mosaic.astype(np.float32)/65535*255

What's the right understanding of this question. Looking forward for your reply. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant