Faster RGB to Grey conversion Python. [closed]
I am using "cv2.cvtColor(rgb_image, cv2.COLOR_BGR2GRAY)" to convert grey it is taking 0.801 seconds to convert. I am developing a real-time application where I convert RGB image to grey and perform operation but it is slow. Is there any faster way to convert.
Thanks.
I just print time before and after this function. I am using windows, intel i5 processor. I did not enabled any optimization. And I did not complie. @berak
How big is your image?
@FooBar 720X576
And which hardware are you using? How does you code look like?
@FooBar Lenove thinkpad.
image = cv2.imread(path)
start_time = datetime.now()
grey = cv2.cvtcolor(image, cv2.COLORBRG2GREY)
end_time = date time.now() print((end_time-star t_time).total_seconds())
^^ 12 typos in 5 lines, yikes !