Selective Shifting

By Bonan Luan

The code of interest is in showcase.cpp. I wanted to shift the colour of the image, but only the colour of the dog. This required writing a function to identify the pixels of the dog in order to make a mask (in the data folder, the black pixels in start.png are filled with either red or blue based on colour similarity, using a priority queue to expand both regions at the same time), and a function to colour-shift a portion of an image under a mask (modifying hue_shift.cpp).

Acknowledgements

no extra assets used beyond A1’s assets. Used Wikipedia for research and https://en.cppreference.com/w/ as a reference.