Imported Numpy
This commit is contained in:
parent
4ee972c1e5
commit
85be54ab1f
@ -1,15 +1,18 @@
|
||||
import cv2 #OpenCV fuer Bildbearbeitung
|
||||
import tkinter #Zum Erstellen von GUIs
|
||||
|
||||
import numpy as np #Numpy Import
|
||||
|
||||
path =r"C:\Users\max\OneDrive\Desktop\Ohm-Studium\Skripte\6.Semester\Projektarbeit\Projekt_Dyschromasie\Beispielbilder\lena.jpg"
|
||||
|
||||
image = cv2.imread(path) #Einlesen des Bildes (noch hardcodiert, sollte dann in GUI gehen)
|
||||
|
||||
hoehe = image.shape[0] #Auslesen der Bildhoehe
|
||||
breite = image.shape[1] #Auslesen der Bildbreite
|
||||
kanaele = image.shape[2] #Auslesen der Kanaele (3 fuer RGB, 1 fuer Graubild)
|
||||
hoehe = image.shape[0] #Auslesen der Bildhoehe
|
||||
breite = image.shape[1] #Auslesen der Bildbreite
|
||||
kanaele = image.shape[2] #Auslesen der Kanaele (3 fuer RGB, 1 fuer Graubild)
|
||||
|
||||
print(f"Das Bild ist {hoehe} Pixel hoch, {breite} Pixel breit und besitzt {kanaele} Kanaele")
|
||||
|
||||
print(image[0][0]) #Darstellung des 1. Pixels
|
||||
|
||||
cv2.namedWindow("Display") #Displaywindow erstellen
|
||||
cv2.imshow("Display",image) #Bild zeigen
|
||||
|
Loading…
x
Reference in New Issue
Block a user