In the exercise this week, we implemented pseudo-color image processing. The idea of this weeks exercise was to implement the detection of typhoon in the image like that of the weather maps we see on TV.
Here it the notes I based on to implement it:
This is the original image at the top and the target(goal of the exercise) image is at the bottom. The images have a size of 173 by 245.
Under standard process of the pseudocode:
- To first turn it into a grayscale image.
- Pass through all the pixels.
- In each pixel you assign a color according to the intensity of the image or the pixel.
- And then do this for all pixel values.
The output expected would be like this:
Looks like hell doesn’t it? I second that.
So what we, me and my partner, had to do was limit the amount of what was sliced in the image. We accomplished this initially by observing the RGB values present in the image and what values are the maximum for the land and water. From there only the values of the land and water will be switch with that of the color palette assigned. We also resized the image initially so we could get a better view of what we were doing.
The color palette was of size 500 by 50 so we still needed to adjust the value switched into the image.
There was a special case where the values that were highest in the clouds reached about 250 and above where the code we implemented didn’t take in those values properly an were assigned with a grey value. So we added another case of where the values greatest will turn into black to take in the other values.
So this is our final output.
I just added the initial code needed to slice only a selected part of the image for the pseudocode that was presented and both us did the implementation in class hours.