In [2]: %pylab inline Populating the interactive namespace from numpy and matplotlib In [3]: import numpy as np import matplotlib.pyplot as plt from skimage import io, color, feature In [4]: filename = "../sample/sample/10_left.jpeg" image = io.imread(filename) gray = color.rgb2gray(image) In [5]: gray.shape Out[5]: (3168, 4752) In [6]: np.histogram(gray) Out[6]: (array([7972546, 76184, 1027385, 1151136, 1396342, 1722503, 934449, 568661, 193914, 11216]), array([ 0. , 0.09623659, 0.19247318, 0.28870976, 0.38494635, 0.48118294, 0.57741953, 0.67365612, 0.76989271, 0.86612929, 0.96236588]))

Only displaying values greater than 0 because the raw images are dominated by black. In [7]: ignore = plt.hist(gray[gray > 0].flatten(), 256)

In [26]: red = image[:, :, [0]] green = image[:, :, [1]] blue = image[:, :, [2]]

1 of 3

4/28/15, 19:23

In [33]: ignore = plt.hist(red[red > 0].flatten(), 256)

In [34]: ignore = plt.hist(green[green > 0].flatten(), 256)

In [35]: ignore = plt.hist(blue[blue > 0].flatten(), 256)

In [36]: hsv_image = color.rgb2hsv(image) In [39]: hue = hsv_image[:, :, [0]] sat = hsv_image[:, :, [1]] value = hsv_image[:, :, [2]]

2 of 3

4/28/15, 19:23

In [43]: ignore = plt.hist(hue[hue > 0].flatten(), 256)

In [45]: ignore = plt.hist(sat[sat > 0].flatten(), 256)

In [47]: ignore = plt.hist(value[value > 0].flatten(), 256)

In [ ]:

3 of 3

4/28/15, 19:23

1 of 3 4/28/15, 19:23 - GitHub

Apr 28, 2015 - Populating the interactive namespace from numpy and matplotlib. Out[5]: (3168, 4752). Out[6]: (array([7972546, 76184, 1027385, 1151136, ...

130KB Sizes 1 Downloads 55 Views

Recommend Documents

838-1923-1-PB.pdf
in situ) yang disebabkan karena. keterbatasan sifat gelombang. elektromagnetik dan ... Page 4 of 11. Main menu. Displaying 838-1923-1-PB.pdf. Page 1 of 11.

1 - GitHub
Mar 4, 2002 - is now an integral part of computer science curricula. ...... students have one major department in which they are working OIl their degree.

1 3 3 ITEM NO. PART NUMBER QTY. 1 Acrylic Wall Panel 2 2 ... - GitHub
*This Page is for the stand off for mounting the acrylic case to the Robot kit. These pieces also Include another pair for 10-24. Hex Nut*. DETAIL B. SCALE 1 : 1.

1 - GitHub
are constantly accelerated by an electric field in the direction of the cathode, the num- ...... als, a standard fit software written at the University of Illinois [Beechem et al., 1991], ...... Technical report, International Computer Science Instit

Feb. 13, 1923.
energy on radio-electro-sensitive'means, and causing ... sources of electric energy,'for example, a. , and the .... "lIlg an alternative repeating arrangement,. 115.

Brooklyn Community District 3 - GitHub
Transportation/Utility. Public/Institutional. Open Space. Parking. Vacant. Other. 6,911. 6,373. 194. 1,457. 245. 199. 32. 368. 39. 284. 822. 71. U tica. A v. Broadway ... Bedford-Stuyvesant, Stuyvesant Heights, Tompkins Park North. Top 3 pressing iss

Operating Systems Homework #3 - GitHub
May 14, 2015 - (Integer) Number indicating scheduling algorithm. 27 int policy;. 28. // Enum values for policy. 29 const short FCFS=0, SJF=1, PRIOR=2, RR=3;.