Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Apr 8, 2020
1 parent ea57c84 commit 26f0e9d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/simple.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import print_function

# show mono16 format logic
import numpy
import motmot.imops.imops as imops
Expand All @@ -15,3 +16,17 @@
print("fin[0,0], fout[0,0]", fin[0, 0], fout[0, 0])
print("fin[0,1], fout[0,1]", fin[0, 1], fout[0, 1])
print("fin[0,2], fout[0,2]", fin[0, 2], fout[0, 2])


h = 2
w = 3
fin3 = numpy.zeros((h, w), dtype=numpy.uint8)
fin3[0, 0] = 255
fin3[0, 1] = 10

print("fin3", fin3)

fout3 = imops.mono8_to_rgb8(fin3)
print("fout3 R\n", fout3[:, :, 0])
print("fout3 G\n", fout3[:, :, 1])
print("fout3 B\n", fout3[:, :, 2])

0 comments on commit 26f0e9d

Please sign in to comment.