|
6 | 6 | import numpy
|
7 | 7 | import cv2
|
8 | 8 |
|
| 9 | +# NEEDS TO BE COMMENTED OUT FOR LANKA |
| 10 | +# import matplotlib.pyplot as plt |
| 11 | + |
9 | 12 | # Get the path to the directory holding random tensors. Error out
|
10 | 13 | # if this isn't set.
|
11 | 14 | TENSOR_PATH = os.environ['TACO_TENSOR_PATH']
|
@@ -408,31 +411,32 @@ def dense_window(self, num):
|
408 | 411 | result_np[m0+dm0:m0+3*dm0, m1-3*dm1:m1-dm1] = 1
|
409 | 412 | return result_np
|
410 | 413 |
|
| 414 | +# NEEDS TO BE COMMENTED OUT FOR LANKA |
411 | 415 | # plot_image plots the given original, binned, xor, and sparse xor images
|
412 | 416 | # for the numpy/image.py. Used for debugging only with the --plot flag
|
413 |
| -# def plot_image(img, img1, img2, xor_img, sparse_xor_img, t1, t2, window=None): |
414 |
| -# f, ax = plt.subplots(2, 3) |
415 |
| -# ax[0, 0].imshow(img1, 'gray') |
416 |
| -# ax[0, 0].title.set_text("Binned Image 1. t1 = " + str(t1)) |
417 |
| -# |
418 |
| -# ax[0, 1].imshow(img2, 'gray') |
419 |
| -# ax[0, 1].title.set_text("Binned Image 2. t2 = " + str(t2)) |
420 |
| -# |
421 |
| -# ax[1, 0].imshow(img, 'gray') |
422 |
| -# ax[1, 0].title.set_text("Saturdated Image") |
423 |
| -# |
424 |
| -# ax[1, 1].imshow(xor_img, 'gray') |
425 |
| -# ax[1, 1].title.set_text("XOR Image") |
426 |
| -# |
427 |
| -# ax[1, 2].imshow(sparse_xor_img, 'gray') |
428 |
| -# ax[1, 2].title.set_text("Sparse XOR Image") |
429 |
| -# |
430 |
| -# if window is not None: |
431 |
| -# ax[0, 2].imshow(window, 'gray') |
432 |
| -# ax[0, 2].title.set_text("Fused Window Image") |
433 |
| -# |
434 |
| -# f.tight_layout() |
435 |
| -# plt.show() |
| 417 | +#def plot_image(img, img1, img2, xor_img, sparse_xor_img, t1, t2, window=None): |
| 418 | +# f, ax = plt.subplots(2, 3) |
| 419 | +# ax[0, 0].imshow(img, 'gray') |
| 420 | +# ax[0, 0].title.set_text("Original Image") |
| 421 | +# |
| 422 | +# ax[0, 1].imshow(img1, 'gray') |
| 423 | +# ax[0, 1].title.set_text("Binned Image 1. t = " + str(t1)) |
| 424 | +# |
| 425 | +# ax[0, 2].imshow(img2, 'gray') |
| 426 | +# ax[0, 2].title.set_text("Binned Image 2. t = " + str(t2)) |
| 427 | +# |
| 428 | +# ax[1, 0].imshow(xor_img, 'gray') |
| 429 | +# ax[1, 0].title.set_text("Edge Detected Image") |
| 430 | +# |
| 431 | +# ax[1, 2].imshow(sparse_xor_img, 'gray') |
| 432 | +# ax[1, 2].title.set_text("Masked Edge Image") |
| 433 | +# |
| 434 | +# if window is not None: |
| 435 | +# ax[1, 1].imshow(window, 'gray') |
| 436 | +# ax[1, 1].title.set_text("ROI Mask") |
| 437 | +# |
| 438 | +# f.tight_layout() |
| 439 | +# plt.show() |
436 | 440 |
|
437 | 441 | # construct_minmax_tensor_key constructs a unique key that represents
|
438 | 442 | # an image tensor parameterized by the tensor order
|
|
0 commit comments