Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
EasyIDP 2.0
EasyIDP 2.0

快速上手

  • 安装EasyIDP

背景知识

  • 使用虚拟环境
  • 兴趣区域(ROI)标注
  • GeoTiff透明度

举些栗子

  • 从 shapefile 加载 ROI
  • 按 ROI 裁剪 DOM/DSM/PCD
  • Backward Projection
  • 从 DSM 获取高度(Z)值
  • 正向投影(简单草稿演示)
  • Case 1: Flat surface by ProjctiveTransform
  • Case 2: Variable surface of forest canopy by AffineTransform

Python API

  • API概述
  • 数据
    • easyidp.data.Lotus
    • easyidp.data.ForestBirds
    • easyidp.data.EasyidpDataSet
    • easyidp.data.TestData
    • easyidp.data.user_data_dir
    • easyidp.data.show_data_dir
    • easyidp.data.url_checker
    • easyidp.data.download_all
  • 点云
    • easyidp.pointcloud.PointCloud
    • easyidp.pointcloud.read_las
    • easyidp.pointcloud.read_laz
    • easyidp.pointcloud.read_ply
    • easyidp.pointcloud.write_las
    • easyidp.pointcloud.write_laz
    • easyidp.pointcloud.write_ply
  • GeoTiff
    • easyidp.geotiff.GeoTiff
    • easyidp.geotiff.get_header
    • easyidp.geotiff.get_imarray
    • easyidp.geotiff.geo2pixel
    • easyidp.geotiff.pixel2geo
  • • cvtools
    • easyidp.cvtools.imarray_crop
    • easyidp.cvtools.poly2mask
    • easyidp.cvtools.rgb2gray
  • 兴趣区(ROI)
    • easyidp.roi.ROI
    • easyidp.roi.read_cc_txt
  • • shapefile
    • easyidp.shp.read_proj
    • easyidp.shp.show_shp_fields
    • easyidp.shp.read_shp
  • • jsonfile
    • easyidp.jsonfile.read_json
    • easyidp.jsonfile.read_geojson
    • easyidp.jsonfile.show_geojson_fields
    • easyidp.jsonfile.dict2json
    • easyidp.jsonfile.write_json
    • easyidp.jsonfile.save_json
  • • geotools
    • easyidp.geotools.convert_proj
    • easyidp.geotools.convert_proj3d
    • easyidp.geotools.is_single_point
  • reconstruct
    • easyidp.reconstruct.Recons
    • easyidp.reconstruct.Sensor
    • easyidp.reconstruct.Photo
    • easyidp.reconstruct.Calibration
    • easyidp.reconstruct.ChunkTransform
    • easyidp.reconstruct.sort_img_by_distance
    • easyidp.reconstruct.save_back2raw_json_and_png
  • • Pix4D
    • easyidp.pix4d.Pix4D
    • easyidp.pix4d.parse_p4d_project
    • easyidp.pix4d.parse_p4d_param_folder
    • easyidp.pix4d.read_xyz
    • easyidp.pix4d.read_pmat
    • easyidp.pix4d.read_cicp
    • easyidp.pix4d.read_ccp
    • easyidp.pix4d.read_campos_geo
    • easyidp.pix4d.read_cam_ssk
  • • Metashape
    • easyidp.metashape.Metashape
    • easyidp.metashape.read_project_zip
    • easyidp.metashape.read_chunk_zip
    • easyidp.metashape.apply_transform_matrix
  • Visualize
    • easyidp.visualize.draw_polygon_on_img
    • easyidp.visualize.draw_backward_one_roi

项目开发

  • 贡献
Back to top
View this page

easyidp.cvtools.rgb2gray¶

easyidp.cvtools.rgb2gray(rgb)¶

将 RGB 图像转换为灰度图像

参数:

rgb (mxnx3 ndarray) -- 需要转换的 RGB ndarray 图像

返回:

gray -- 转换后的输出 2D ndarray

返回类型:

mxn ndarray

备注

使用与 matplotlib 相同的公式进行转换 [1] 。

引用

[1]

https://stackoverflow.com/questions/12201577/how-can-i-convert-an-rgb-image-into-grayscale-in-python

Next
兴趣区(ROI)
Previous
easyidp.cvtools.poly2mask
Copyright © 2022, Haozhou Wang
Made with Sphinx and @pradyunsg's Furo
On this page
  • easyidp.cvtools.rgb2gray
    • rgb2gray()