Where is the opencv frame code in gstreamer?

Hello all,
I wanna ask to you all, how to consume the gstreamer frame ? in OpenCV there’s a code

cap = cv2.VideoCapture(0)
_, <b>frame </b>= cap.read()

But i’m in confuse, where is the frame in gstreamer ?

There isn’t really an equivalent in Gstreamer. Buffers are passed down a pipeline a bit like a chain of python generators or a stream of data from source to sink. Buffers can be anything, not just frames. Sometimes it might be less than a frame. Other times it might be whole batches of them.

What’s the end goal of your app? Do you want to draw bounding boxes around things or send detection/classification metadata around? You can do all that. It’s just done in a different way. What’s the idea you have for your app?

Thank you for your response mr. mdegans
I want to find a contour from the stream(like detect the colour), because all the time i use the opencv code.

There are several posts about gstreamer + OpenCV:
Please take a look. These posts may bring more information for your usecase.