Hello,

I got this error: IndentationError: expected an indented block

Im new to python and only used to php, i have no idea what to do.

#!/usr/bin/python

import numpy as np
import argparse
import cv2

cap = cv2.VideoCapture(0)

while(True):
    # Capture frame-by-frame
    ret, frame = cap.read()

    # Operations

     orig = frame.copy()
     gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

     gray = cv2.GaussianBlur(gray, (41, 41), 0)
     (minVal, maxVal, minLoc, maxLoc) = cv2.minMaxLoc(gray)
     image = orig.copy()
     cv2.circle(image, maxLoc, 41, (255, 0, 0), 2)

    # Display the resulting frame
    cv2.imshow('frame',image)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()

I did runexpand -t 4 script.py > fixed_script.py with no luck

Okey php doesn't care about tabs and spaces.. but python do, ohh well. :P

I got spaces and tabs mixed up, it is working now :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.