Question: I am trying to first upload images to firebase then retrieving in in an activity(gallery) but getting a code error.

```
    @Override
    public void onBindViewHolder(ImageViewHolder holder, int position) {
       ImageUploaderAdapter uploadCurrent = mUploads.get(position);
       holder.textViewName.setText(uploadCurrent.getName());
       Picasso.get().load(mContext).into(imageView)
            .load(uploadCurrent.getImageUrl())
            .fit()
            .centerCrop()
            .into(holder.imageView);

```

Error in code `Picasso.get().load(mContext).into(imageView)`

getting error 

```
error: method get in class Picasso cannot be applied to given types;
        Picasso.get(mContext)

```

Answer: 
matchTemplate wont work well in this case, as they need exact size and viewpoint match. 

Opencv Feature based method might work. You can try SIFT based method first. But the general assumption is that the rotation, translation, perspective changes are bounded. It means that for adjacent iamge pair, it can not be 1 taken from 20m and other picture taken from 10km away. Assumptions are made so that the feature can be associated. 
[![enter image description here](https://i.stack.imgur.com/WgfIQ.png)](https://i.stack.imgur.com/WgfIQ.png)

Deep learning-based method might work well given enough datasets. take POSEnet for reference. It can matches same building from different geometry view point and associate them correctly. 
[![enter image description here](https://i.stack.imgur.com/sr0c2.png)](https://i.stack.imgur.com/sr0c2.png)

Each method has pros and cons. You have to decide which method you can afford to use

Regards

Dr. Yuan Shenghai
For pixel-wise similarity, you may use `res = cv2.matchTemplate(img1, img2, cv2.TM_CCOEFF_NORMED) \\ similarity = res[0][0]`, which adopts standard corralation coefficient to evaluate simlarity (first assure two inputted image is in the same size).

For chromatic similarity, you may calculate histogram of each image by `cv2.calHist`, then measure the similarity between each histogram by metric of your choice.

For intuitive similarity, I'm afraid you have to use some machine learning or deep learning method since "similar" is a rather vague concept here.