Hello gbanuru, you could use ImageManip node to crop a small square from the color frame.
As for the configuration of the ImageManip, you could use something like this:
manip.initialConfig.setCropRect(0.4, 0.4, 0.6, 0.6)
manip.initialConfig.setResize(300, 300)
I hope this helps!
Thanks, Erik