If you know the G is there, you can get a mask for the G letter with the following code, which assumes the G will be the leftmost letter in the image:
rgbImage = imread('google.jpeg');
mask = ~imbinarize(rgb2gray(rgbImage));
labeledImage = bwlabel(mask);
g = ismember(labeledImage, 1);
If you're not sure if the G is there, then you can use the normalized cross correlation (as in my other answer) to see if it's there or not.