OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Mediapipe Hand Landmark Detection How to remove Firework in Background when Thumbs up

  • Thread starter Thread starter Leon Hausmann
  • Start date Start date
L

Leon Hausmann

Guest
I recently did a project on detecting Landmarks with Mediapipe. The Problem is when I do a thumbs up in the camera media pipe somehow detects it and adds a firework in the background. I don't know why media pipe is doing this. How can I disable it?

Code:
from matplotlib import pyplot as plt
import mediapipe as mp
from mediapipe.framework.formats import landmark_pb2
import cv2

mp_hands = mp.solutions.hands
mp_drawing = mp.solutions.drawing_utils

vid = cv2.VideoCapture(0)
vid.set(3, 515) #set height
vid.set(4, 515) #set width

while(True):
    ret, frame = vid.read()



    frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
    results = mp_hands.Hands().process(frame)
    frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)

    if results.multi_hand_landmarks:
        print(results.multi_hand_landmarks)
        for hand_landmarks in results.multi_hand_landmarks:
            mp_drawing.draw_landmarks(frame, hand_landmarks, connections=mp_hands.HAND_CONNECTIONS)

    cv2.imshow('frame', frame)

    if cv2.waitKey(1) & 0xFF == ord('e'):
        break

vid.release()
cv2.destroyAllWindows()

I don't know why it is doing it
<p>I recently did a project on detecting Landmarks with Mediapipe. The Problem is when I do a thumbs up in the camera media pipe somehow detects it and adds a firework in the background. I don't know why media pipe is doing this. How can I disable it?</p>
<pre><code>from matplotlib import pyplot as plt
import mediapipe as mp
from mediapipe.framework.formats import landmark_pb2
import cv2

mp_hands = mp.solutions.hands
mp_drawing = mp.solutions.drawing_utils

vid = cv2.VideoCapture(0)
vid.set(3, 515) #set height
vid.set(4, 515) #set width

while(True):
ret, frame = vid.read()



frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
results = mp_hands.Hands().process(frame)
frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)

if results.multi_hand_landmarks:
print(results.multi_hand_landmarks)
for hand_landmarks in results.multi_hand_landmarks:
mp_drawing.draw_landmarks(frame, hand_landmarks, connections=mp_hands.HAND_CONNECTIONS)

cv2.imshow('frame', frame)

if cv2.waitKey(1) & 0xFF == ord('e'):
break

vid.release()
cv2.destroyAllWindows()




</code></pre>
<p>I don't know why it is doing it</p>
 

Latest posts

A
Replies
0
Views
1
AgencyAnalytics
A
S
Replies
0
Views
1
Stacker Media
S
C
Replies
0
Views
1
CC.Talent
C
Top