OpenCV Python Examples (Showing Image)

For the C++ implementation see this and  this post.
import sys
import cv2.cv as cv

if __name__ == '__main__':
input_name = args[0]
image = cv.LoadImage(input_name, 1)
cv.ShowImage("result", image)
cv.WaitKey(0)

2 comments:

  1. getting an error:
    File "showimg.py", line 5
    input_name=args[0]
    ^
    IndentationError: expected an indented block

    ReplyDelete