Skip to content

Instantly share code, notes, and snippets.

@tocttou
Created August 6, 2016 05:17
Show Gist options
  • Save tocttou/1fd770483294fab36cd17a163e21c4c9 to your computer and use it in GitHub Desktop.
Save tocttou/1fd770483294fab36cd17a163e21c4c9 to your computer and use it in GitHub Desktop.
import cv2
import cvfy
app = cvfy.register('nongh:107.170.77.168:6391972:3000:8005:107.170.77.168')
@cvfy.crossdomain
@app.listen()
def grayscale():
all_image_paths = cvfy.getImageArray()
image_1_path = all_image_paths[0] ## /tmp/somepath/somefile.png
image_2_path = all_image_paths[1] ## /tmp/somepath/someanotherfile.png
image_1 = cv2.imread(image_1_path)
image_2 = cv2.imread(image_2_path)
# image_1 and image_2 are numpy arrays, formed by loading the image from path given by.
return 'OK'
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment