Skip to content

Instantly share code, notes, and snippets.

@sriharsha0806
Created September 13, 2016 03:20
Show Gist options
  • Save sriharsha0806/b30205d5b7333f1220061cb94864c597 to your computer and use it in GitHub Desktop.
Save sriharsha0806/b30205d5b7333f1220061cb94864c597 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 31 23:38:07 2016
@author: sriharsha
"""
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('Fig0228(a)(angiography_mask_image).tif',0)
cv2.imshow('Mask_image',img)
cv2.waitKey(100)
img1 = cv2.imread('Fig0228(b)(angiography_live_ image).tif',0)
cv2.imshow('live_image',img1)
cv2.waitKey(100)
Diff = cv2.subtract(img,img1)
#[X,Y,Z]=Diff.shape
#diff = cv2.resize(Diff,(2*X,2*Y))
cv2.imshow('Difference_2images',Diff)
cv2.waitKey(1000)
equ = cv2.equalizeHist(Diff)
res = np.hstack((Diff,equ))
cv2.imwrite('res.tif',res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment