Skip to content

Image RGB - Gray #165

@junxnone

Description

@junxnone

Reference

Brief

RGB <--> Gray

转换 公式
RGB(A) -> Gray image
Gray -> RGB(A) image
grayimg = cv2.imread(img_path, 0)
plt.imshow(grayimg,cmap = 'gray')

除了加权平均法外,还可以使用分量, 最大值,平均值法取灰度图


image

Example

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions