File:EmiMa-099-Prewitt-x-color.jpg

Original file(5,543 × 3,695 pixels, file size: 10.43 MB, MIME type: image/jpeg)

Captions

Captions

Add a one-line explanation of what this file represents

Summary edit

Description
English: Image "EmiMa-099" convolved with Prewitt-x operator in all 3 RGB color channels
Deutsch: EmiMa-099" wurde in allen dreien RGB-Farbkanälen mit dem Prewitt-x Operator gefaltet.
Date
Source Own work
Author MartinThoma
Other versions
File:EmiMa-099.jpg
EmiMa-099
#!/usr/bin/env python

from PIL import Image
from scipy.ndimage import imread
from scipy.signal import convolve2d
import numpy as np

im = imread('EmiMa-099.jpg')

# Edge filter
weights = [[-1, -1, -1]], [0, 0, 0], [1, 1, 1]
im0 = convolve2d(im[:,:,0], weights, mode='same')
im1 = convolve2d(im[:,:,1], weights, mode='same')
im2 = convolve2d(im[:,:,2], weights, mode='same')

rgbArray = np.zeros((im0.shape[0], im0.shape[1], 3), 'uint8')
rgbArray[..., 0] = im0
rgbArray[..., 1] = im1
rgbArray[..., 2] = im2

img = Image.fromarray(rgbArray)
img.save('EmiMa-099-Prewitt-x-color.jpg')

Licensing edit

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current07:15, 9 February 2019Thumbnail for version as of 07:15, 9 February 20195,543 × 3,695 (10.43 MB)MartinThoma (talk | contribs){{Information |description ={{en|1=Image "EmiMa-099" convolved with Prewitt-x operator in all 3 RGB color channels}} {{de|1=EmiMa-099" wurde in allen dreien RGB-Farbkanälen mit dem Prewitt-x Operator gefaltet.}} |date =2019-02-09 |source ={{own}} |author =User:MartinThoma }} <source lang="Python"> #!/usr/bin/env python from PIL import Image from scipy.ndimage import imread from scipy.signal import convolve2d import numpy as np im = imread('EmiMa-099.jpg') # Ed...