Ask Your Question

murkoc's profile - activity

2020-06-06 10:11:12 -0600 received badge  Enthusiast
2020-06-04 19:10:40 -0600 marked best answer [SOLVED]How to Save Each ROI Seperately

Hello,

I have below code:

import cv2
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)

n_rows = 3
n_images_per_row = 3
while(True):

    # Capture frame-by-frame
    ret, frame = cap.read()
    height, width, ch = frame.shape
    roi_height = int(height / n_rows)
    roi_width = int(width / n_images_per_row)
    images = []
    for x in range(0, n_rows):
    for y in range(0,n_images_per_row):
    tmp_image=frame[x*roi_height:(x+1)*roi_height, y*roi_width:(y+1)*roi_width]
    images.append(tmp_image)
    # Display the resulting sub-frame
    for x in range(0, n_rows):
    for y in range(0, n_images_per_row):
    cv2.imshow(str(1+y+x*n_images_per_row), images[x*n_images_per_row+y])
    cv2.moveWindow(str(x * n_images_per_row + y + 1), 100 + (y * roi_width), 50 + (x * roi_height))

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

    cv2.imshow(cap.release())

cv2.destroyAllWindows()

I would like to save each frame seperately.

2020-06-04 19:10:40 -0600 received badge  Scholar (source)
2020-06-04 13:25:09 -0600 asked a question Python Image Processing Continuous Calibration Kernel Issue

Python Image Processing Continuous Calibration Kernel Issue Hi, I have a Python program with OpenCV libraries. I am set

2020-06-04 13:25:05 -0600 asked a question Python Image Processing Continuous Calibration Kernel Issue

Python Image Processing Continuous Calibration Kernel Issue Hi, I have a Python program with OpenCV libraries. I am set

2019-11-20 03:24:46 -0600 commented question How does opencv with cuda work?

for better understanding your aim, could you provide code example please?

2019-10-15 08:10:25 -0600 received badge  Supporter (source)
2019-10-15 01:25:47 -0600 commented answer [SOLVED]How to Save Each ROI Seperately

perfect thank you!!!

2019-10-14 10:53:36 -0600 received badge  Student (source)
2019-10-11 07:09:08 -0600 commented question [SOLVED]How to Save Each ROI Seperately

just need to change the lines with the for loops.

2019-10-11 04:47:20 -0600 asked a question [SOLVED]How to Save Each ROI Seperately

How to Save Each ROI Seperately Hello, I have below code: Blockquote import cv2 cap = cv2.VideoCapture(0) cap.set