OpenCV TUTORIAL #2 How to Change Resolution or Rescale Frame in OpenCV with Python

preview_player
Показать описание
OpenCV with Python Series #2 : How to Change Resolution or Rescale Frame

Install OpenCV for Python on your system:

Рекомендации по теме
Комментарии
Автор

I believe the scaling didnt work on your example because of the variable scale_percent in the function rescale_frame:
it is set up scale_percent = 75 always if im not mistaken, if you set its value to the passed argument "percent" it works
def rescale_frame(frame, percent=75):
scale_percent = percent
# rest of code

Let me know if im wrong, im learning python myself...

Also, great tut.. ill be following for more!

xslnx
Автор

Hi, good video thank you! Do you think that should the scale_percent variable in the 24th line be the percent parameter? That's works for me as it is by default 75% so it is not much different in your example.

hamadahiro
Автор

Nice vids, but when I started this project my grayscale stopped working and now its also not resizing, so can I have some help, please.

daniyalhussain
Автор

Nice video sir !!! Thankyou for this!! Can you please tell, how to change the brightness and contrast of real time web cam??

krdshow
Автор

I'm watching this on my 4:20 monitor. Thanks!

haley
Автор

Thank you I'm search alot for this video❤️

shubhamchawdhary
Автор

cv2.error: OpenCV(4.3.0) error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

anitasigamani
Автор

Hi, thanks for the explanation ... I have done the source code test and I have realized that it only works for a webcam.
But what would the procedure be like for an ip type camera?

marcossoto
Автор

Really don't know if this is important, I feel when you added a factor of 500 and it refused to scale was because frame used in the argument of frame2 is redefined as rescale_frame(frame, percent=30) in stead of its original value in cap.read(). I hope I am correct.

achebepeter
Автор

What if my objective is to reduce the frames per second? Say from 30 fps 1080p, I want to make it 2 fps (for analysis)?

msds
Автор

Hi Justin, May I ask you that how I can rescale the video stream on tkinter interface with canvas.create_image()? I tried to rescale with canvas.scale(), however, it obviously didn't work. If you are willing to give me some suggestions, I would really appreciate that! Thank you for the great videos sharing!

leohsusolid
Автор

but can u change resolution, inside the WHILE ?? can i change it on the fly or do i need to stop the running and begin from the start?? tnx

gallilos
Автор

can you tell how to sort this
cv2.error: OpenCV(4.3.0) error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

anitasigamani
Автор

Good video thank you! Have you ever tried to run the open cv object tracking on the raspberry pi 3? with a 480/360 camera resolution, object detection per frame takes around 150-200 ms, which is quite disappointing for an 4xARM7. Thank you. Terence

ashovav
Автор

Thanks for the video, it helped my a lot!

fpgamachine
Автор

Thanks for your nice video. Its possible to resolution switches one to another with automatically using script?. Kindly reply to me.

sureshbabu_r
Автор

can you please upload a video on emotion recognition using facial expressions

shrinithamonica
Автор

I used video as input instead of camera, why change_res didn't work but rescale worked?

alan
Автор

Thank you very much man you helped me a lot <3

BrunoRibeiro-xcet
Автор

Thank you! Does this work when I use VideoStream instead of VideoCapture as well? Thanks.

배상은-lc
welcome to shbcf.ru