Python Forum
libhdf5 library error (opencv-contrib)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
libhdf5 library error (opencv-contrib)
#1
Hello everyone I just bought a RaspberryPI4 and I'm a beginner.

I'm using Python3.7 and I installed :
sudo pi3 opencv-contrib-python 3.4.4.19 for this code


import cv2
import os
import numpy as np
import Facerecognition as fr

test_img = cv2.imread('/home/pi/foto1.jpg')
face, gray = fr.faceDetection(test_img)

#faces,facesID=fr.training_data('/home/pi/CV/immagini')
#faceRecognizer=fr.training_classifier(faces,facesID)
#faceRecognizer.save("trainedData.yml")
faceRecognizer=cv2.face.LBPHFaceRecognizer_create()
faceRecognizer.read()

name={0:"Gianluca",1:"Sconosciuto"}

for face in face:
(x,y,w,h)=face
region=gray[y:y+h, x:x+w]
label,confidence=faceRecognizer.predict(region)
print("confidence",confidence)
print("label",label)
fr.draw_rect(test_img,face)
predicted_name=name[label]
if (confidence>60):
continue
fr.put_name(test_img,predicted_name,x,y)


resized=cv2.resize(test_img, None, fx=0.5, fy=0.5)
cv2.imshow('trovata:',resized)
cv2.waitKey(0)
cv2.destroyAllWindows()
(functions are in another module)
But I have this problem:

Error:
Traceback (most recent call last): File "/home/pi/CV/tester.py", line 1, in <module> import cv2 File "/usr/local/lib/python3.7/dist-packages/cv2/__init__.py", line 3, in <module> from .cv2 import * ImportError: libhdf5_serial.so.103: cannot open shared object file: No such file or directory
How can i install this library?
Can you help me please?

Gianluca
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in blend_modes library talgreen 6 992 Jul-01-2023, 05:32 PM
Last Post: talgreen
  python requests library .JSON() error mHosseinDS86 6 3,439 Dec-19-2022, 08:28 PM
Last Post: deanhystad
  Screen capture opencv - grab error Kalman15 1 1,606 Jan-27-2022, 12:22 PM
Last Post: buran
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,637 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Error about parser library and tree builder Led_Zeppelin 8 11,514 Jun-11-2021, 08:53 PM
Last Post: snippsat
  error while installing any library using pip in windows AkashKansal 1 4,401 Sep-24-2020, 07:51 AM
Last Post: buran
  Error Installing PySceneDetect and OpenCV jpnoli 1 1,914 Mar-26-2020, 12:19 PM
Last Post: buran
  python opencv grayscale conversion error Spandora 1 9,574 May-26-2019, 10:43 AM
Last Post: heiner55
  Error message when importing jsonlines library vakil67 5 7,354 May-16-2018, 08:51 PM
Last Post: vakil67
  Python openCV "img" is not defined error Arontbt 2 8,114 Apr-23-2018, 07:55 PM
Last Post: Arontbt

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020