仲夏入園中東陂‧唐‧儲光羲
方塘深且廣,伊昔俯吾廬。
環岸垂綠柳,盈澤發紅蕖。
上延北原秀,下屬幽人居。
暑雨若混沌,清明如空虛。
此鄉多隱逸,水陸見樵漁。
廢賞亦何貴,為歡良易攄。
且言重觀國,當此賦歸歟。
欲究 skimage 相似變換之理︰
SimilarityTransform
class skimage.transform.
SimilarityTransform
(matrix=None, scale=None, rotation=None, translation=None)
Bases: skimage.transform._geometric.EuclideanTransform
2D similarity transformation of the form:
- X = a0 * x – b0 * y + a1 =
- = s * x * cos(rotation) – s * y * sin(rotation) + a1
- Y = b0 * x + a0 * y + b1 =
- = s * x * sin(rotation) + s * y * cos(rotation) + b1
where s
is a scale factor and the homogeneous transformation matrix is:
[[a0 b0 a1] [b0 a0 b1] [0 0 1]]
The similarity transformation extends the Euclidean transformation with a single scaling factor in addition to the rotation and translation parameters.
Parameters: |
matrix : (3, 3) array, optional
scale : float, optional
rotation : float, optional
translation : (tx, ty) as array, list or tuple, optional
|
---|
Attributes
params | ((3, 3) array) Homogeneous transformation matrix. |
,如墜混沌中,莫非是因暑雨後,頭昏腦不清!這 何指?那 又是什麼 □ ○ ??考之 draw 模組圓盤和線段之說明︰
circle
skimage.draw.
circle
(r, c, radius, shape=None)- Generate coordinates of pixels within circle.
Parameters: r, c : double
Centre coordinate of circle.
radius : double
Radius of circle.
shape : tuple, optional
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for circles which exceed the image size. By default the full extent of the circle are used.
Returns: rr, cc : ndarray of int
Pixel coordinates of circle. May be used to directly index into an array, e.g.
img[rr, cc] = 1
.Notes
This function is a wrapper for skimage.draw.ellipse()
……
line
skimage.draw.
line
()- Generate line pixel coordinates.
Parameters: y0, x0 : int
Starting position (row, column).
y1, x1 : int
End position (row, column).
Returns: rr, cc : (N,) ndarray of int
Indices of pixels that belong to the line. May be used to directly index into an array, e.g.
img[rr, cc] = 1
.See also
line_aa
- Anti-aliased line generator
明示『列』 row 與『行』 column !! 在 之前,難道是講︰ 耶??既然無由計,方塘深且廣,怎不直搗黃龍,親驗座標系乎!!且以笛卡爾座標系── 橫平 、豎直 ,右手逆旋角度為正,左手順轉角度為負 ── 考察一番︰
pi@raspberrypi:~ YX$ !!當真的呢鏡中定『右逆』、『左順』之轉向也!!為何這樣寫??只覺太忽悠??《山海經‧西次三經》:
又西三百五十里曰天山,多金玉,有青雄黃,英水出焉,而西南流注於湯谷。有神焉,其狀如黃囊,赤如丹火,六足四翼,渾敦無面目,是識歌舞,實惟帝江也。
《莊子‧內篇‧應帝王》︰
南海之帝為倏,北海之帝為忽,中央之帝為混沌。
倏與忽時相與遇於混沌之地,混沌待之甚善。
倏與忽謀報混沌之德,曰:『人皆有七竅,以視聽食息,此獨無有,嘗試鑿之。』
日鑿一竅,七日而混沌死。
不 知莊子是否在忽悠人的嗎?混沌和盤古有無關係的呢??
─── 摘自《混沌理論》
總不會想教人將文件看清楚,不明白時請反覆實驗吧??!!其後偶讀
A crash course on NumPy for images
……
Coordinate conventions
Because we represent images with numpy arrays, our coordinates must match accordingly. Two-dimensional (2D) grayscale images (such as camera above) are indexed by row and columns (abbreviated to either
row, col
orr, c
), with the lowest element (0, 0) at the top- -left corner. In various parts of the library, you will also seerr
andcc
refer to lists of row and column coordinates. We distinguish this from (x, y), which commonly denote standard Cartesian coordinates, where x is the horizontal coordinate, y the vertical, and the origin is on the bottom right. (Matplotlib, for example, uses this convention.)In the case of color (or multichannel) images, the last dimension contains the color information and is denoted
channel
orch
.Finally, for 3D images, such as videos, magnetic resonance imaging (MRI) scans, or confocal microscopy, we refer to the leading dimension as
plane
, abbreviated aspln
orp
.These conventions are summarized below:
Image type | coordinates |
---|---|
2D grayscale | (row, col) |
2D multichannel (eg. RGB) | (row, col, ch) |
3D grayscale | (pln, row, col) |
3D multichannel | (pln, row, col, ch) |
只能哈哈大笑,何得清明如空虛矣!!!