`cv2.imshow` displays an image in a named window. It provides the visible preview for camera-driven programs, so each captured or processed frame can be checked as the program runs. section 8.3.3
Call `imshow` after drawing any feedback onto the image. In a snapshot preview, temporary status text is added with `putText` before the frame is shown; the resulting window updates at the capture rate to form a live feed. section 8.3.3
Show a camera frame with a save message
Keep display code in a reusable function. When a message is queued, draw it on the current frame, then show that same frame in the `preview` window. ```python def show_image(frame, messages): if messages: cv2.putText(frame, messages.pop(), TEXT_POS, FONT, 1, BLUE) cv2.imshow('preview', frame) ``` section 8.3.3
A displayed image can also communicate vision results. After face detection draws a rectangle and center marker, `imshow` presents the marked photo. In a QR-code stream, it presents each newly received image after detected codes have been outlined and labeled. section 9.3.2 section 10.4.4
def show_image(frame, messages):
if messages:
cv2.putText(frame, messages.pop(), TEXT_POS, FONT, 1, BLUE)
cv2.imshow('preview', frame)
Inspect the small display helper that overlays queued status text before opening the preview window. section 8.3.3
