comment here
This commit is contained in:
@@ -3,7 +3,7 @@ module interface
|
||||
export np2juliaImage, juliaImg2npImg, imgScalePadding, url_to_cv2_image
|
||||
|
||||
using Images, Colors
|
||||
using Luxor
|
||||
# using Luxor
|
||||
|
||||
using CondaPkg; CondaPkg.add_pip("pybase64"); CondaPkg.add_pip("opencv-python"); CondaPkg.add_pip("urllib3"); CondaPkg.add_pip("Pillow"); CondaPkg.add("numpy");
|
||||
using PythonCall
|
||||
@@ -48,7 +48,7 @@ end
|
||||
julia> cv2 = pyimport("cv2") # import opencv
|
||||
|
||||
julia> img_cv2 = cv2.imread("20.jpg") # julia's PythonCall python-obj numpy array
|
||||
julia> img_julia_array = pyconvert(Array, img_cv2) # julia array but in numpy's row-major format
|
||||
julia> img_julia_array = pyconvert(Array, img_cv2) # resulted in julia array but in numpy's row-major format
|
||||
julia> img_julia_rgb = np2juliaImage(img_julia_array) # julia RGB image
|
||||
"""
|
||||
np2juliaImage(img::AbstractArray) = RGB.(reinterpretc(BGR{N0f8}, PermutedDimsArray(img, (3, 1, 2))))
|
||||
|
||||
Reference in New Issue
Block a user