karansher / computer-graphics-raster-images

Computer Graphics Assignment about Raster Images
1 stars 0 forks source link

about vector size in simulate_bayer_mosaic #19

Closed cuiboyuan closed 2 years ago

cuiboyuan commented 2 years ago

Here at line 9 of simulate_bayer_mosaic.cpp: https://github.com/karansher/computer-graphics-raster-images/blob/df193e7110558591b685a89cac1054ef9591c15a/src/simulate_bayer_mosaic.cpp#L9

The vector size is resized to width*height. Why is it not width*height*3 as the README mentions that "The output image should be the same size as the input"?

Thanks

abhimadan commented 2 years ago

A bayer mosaic has only one colour channel. So the images are the same size but the buffers (arrays that store the images) are not.

cuiboyuan commented 2 years ago

ok I see. Thanks!