dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.61k stars 345 forks source link

Image comaprision by using sameAs function #85

Closed roopahk closed 10 years ago

roopahk commented 10 years ago

Hi i am trying compare images with help of AndroidViewClient 5.4.3 following is the code which i have written, but always it is printing Both images are not same. Is this the correct way of using sameAs function? if not could you please let me know the correct way of using it.

! /usr/bin/env python

import os import sys import PIL from PIL import Image

try: sys.path.append(os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src')) except: pass from com.dtmilano.android.viewclient import ViewClient

image1=('Smell.jpg') image2=('Smell1.jpg')

if sameAs(image1, image2, percent=1.0): print "Both Images are same" else: print"Both images are not same"

dtmilano commented 10 years ago

This question was answered in http://stackoverflow.com/questions/24628830/image-comaprision-by-using-sameas-function-for-androidviewclient-5-1-1