İçeriğe geç

Python ve OpenCV ile Görüntü İşleme 3 – Resim Kaydetme

Okunan bir resmi kaydetmek için imwrite fonksiyonu kullanılır.

import numpy as np
import cv2 as cv

resim = cv.imread("kaynak/metal_slug_2.jpg", cv.IMREAD_GRAYSCALE)
cv.imshow("Ne Oyundu Be", resim)
tuş = cv.waitKey(0)

if tuş == 27:
    cv.destroyAllWindows()
elif tuş == ord('s'):
    cv.imwrite("kaynak/metal.png", resim)
    cv.destroyAllWindows()
3.302 Gösterim  
Tarih:Görüntü İşlemeOpenCV

İlk Yorumu Siz Yapın

Bir cevap yazın

E-posta hesabınız yayımlanmayacak.

This site uses Akismet to reduce spam. Learn how your comment data is processed.