Commit 88e6d172 authored by tihmels's avatar tihmels
Browse files

Experimentierumgebung eingerichtet

parent 043c758c
import cv2
def createwindow(name: str, view, x=70, y=70, width=700, height=700):
def createwindow(name, view, x=70, y=70, w=600, h=600):
cv2.namedWindow(name, cv2.WINDOW_NORMAL)
cv2.resizeWindow(name, width, height)
cv2.resizeWindow(name, w, h)
cv2.moveWindow(name, x, y)
return cv2.imshow(name, view)
\ No newline at end of file
cv2.imshow(name, view)
\ No newline at end of file
import cv2
import cvhelper
import numpy as np
from matplotlib import pyplot as plt
original = cv2.imread('resources/experiments/trump.jpg')
cvhelper.createwindow("Original", original, 0, 0)
gray = cv2.cvtColor(original, cv2.COLOR_BGR2GRAY)
hsv = cv2.cvtColor(original, cv2.COLOR_BGR2HSV)
plt.hist(gray.ravel(), 256, [0,256])
cvhelper.createwindow("Gray", gray, 100)
cvhelper.createwindow("HSV", hsv, 200)
k = cv2.waitKey(0)
if k == cv2.waitKey(0) & 0xFF:
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment