Skip to content

AttributeError: 'numpy.ndarray' object has no attribute '_get_object_id' #21

@tlp19

Description

@tlp19

Hi, I am encountering the following error AttributeError: 'numpy.ndarray' object has no attribute '_get_object_id'.

I am using PyBoof 0.41 on Python 3.9.2, with numpy 1.24.1.

I am trying to run the following code on a Rasberry Pi 4B (Raspbian):

import cv2
import numpy as np
import pyboof as pb

cam = cv2.VideoCapture(0)
detector = pb.FactoryFiducial(np.uint8).qrcode()

while(True):
    success, frame = cam.read()
    if not success:
        break
    else:
        detector.detect(frame)
        print("Detected a total of {} QR Codes".format(len(detector.detections)))

But I get the following error from the line detector.detect(frame):
AttributeError: 'numpy.ndarray' object has no attribute '_get_object_id'

What am I doing wrong here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions