本文整理匯總了Python中OpenImageIO.get_roi_full方法的典型用法代碼示例。如果您正苦於以下問題:Python OpenImageIO.get_roi_full方法的具體用法?Python OpenImageIO.get_roi_full怎麽用?Python OpenImageIO.get_roi_full使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenImageIO
的用法示例。
在下文中一共展示了OpenImageIO.get_roi_full方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: print
# 需要導入模塊: import OpenImageIO [as 別名]
# 或者: from OpenImageIO import get_roi_full [as 別名]
print ("r == r3 (expect no): ", (r == r3))
print ("r != r3 (expect yes): ", (r != r3))
print ("")
print ("r contains (10,10) (expect yes): ", r.contains(10,10))
print ("r contains (1000,10) (expect no): ", r.contains(1000,10))
print ("r contains roi(10,20,10,20,0,1,0,1) (expect yes): ", r.contains(oiio.ROI(10,20,10,20,0,1,0,1)))
print ("r contains roi(1010,1020,10,20,0,1,0,1) (expect no): ", r.contains(oiio.ROI(1010,1020,10,20,0,1,0,1)))
A = oiio.ROI (0, 10, 0, 8, 0, 1, 0, 4)
B = oiio.ROI (5, 15, -1, 10, 0, 1, 0, 4)
print ("A =", A)
print ("B =", B)
print ("ROI.union(A,B) =", oiio.union(A,B))
print ("ROI.intersection(A,B) =", oiio.intersection(A,B))
print ("")
spec = oiio.ImageSpec(640, 480, 3, oiio.UINT8)
print ("Spec's roi is", oiio.get_roi(spec))
oiio.set_roi (spec, oiio.ROI(3, 5, 7, 9))
oiio.set_roi_full (spec, oiio.ROI(13, 15, 17, 19))
print ("After set, roi is", oiio.get_roi(spec))
print ("After set, roi_full is", oiio.get_roi_full(spec))
print ("")
print ("Done.")
except Exception as detail:
print ("Unknown exception:", detail)