title: How can detect an image within another image in Java?
body: <p>Hi I have a color palette like this one, 
  <img src="https://i.stack.imgur.com/sOrpo.jpg" alt="enter image description here"></p>
  
  <p>I have an image.  the image contains a color palette like this. I need to detect this color palett from the image and crop the color palette from the image. Are their any libraries in java to do that. That is  given a reference image are their any library that can use this as template and extract the image from the picture?</p>
  
  <p>Here is an example, if the image is <img src="https://i.stack.imgur.com/Cif16.jpg" alt="enter image description here"></p>
  
  <p>and my reference image is like the first image, I want to detect the first image within the second image and crop that portion to get the similar image image to the reference image. After cropping the second image I will get <img src="https://i.stack.imgur.com/B4qAX.jpg" alt="enter image description here"></p>