Skip to content

Instantly share code, notes, and snippets.

@sriharsha0806
Created September 13, 2016 03:21
Show Gist options
  • Save sriharsha0806/9d993865a023f183986abcc911a256a1 to your computer and use it in GitHub Desktop.
Save sriharsha0806/9d993865a023f183986abcc911a256a1 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 1 10:27:17 2016
@author: sriharsha
"""
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('Fig0230(a)(dental_xray).tif')
cv2.imshow('image',img)
cv2.waitKey(100)
ROI_img=cv2.imread('Fig0230(b)(dental_xray_mask).tif')
cv2.imshow('ROI_image',ROI_img)
cv2.waitKey(100)
result = np.tensordot(img,ROI_img)
cv2.imshow('Result',result)
imgplot = plt.imshow(result)
cv2.waitKey(100)
cv2.imwrite('result.tif',result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment