# 1.二维散点图绘制

pro draw_example
; Read in a 2-band image.

file = FILE_WHICH('glowing_gas.jpg')
!null = QUERY_IMAGE(file, info)

;help,gas[0,*,*]

red_band_pixels = REFORM(gas[0,*,*], PRODUCT(info.dimensions))
green_band_pixels = REFORM(gas[1,*,*], PRODUCT(info.dimensions))
; Plot red versus green band.
myPlot = SCATTERPLOT(red_band_pixels, green_band_pixels, $SYMBOL = 'dot', /SYM_FILLED, SYM_COLOR = 'purple',$
XTITLE = 'Red band value', $YTITLE = 'Green band value',$
TITLE = 'Red vs. green band of "glowing_gas.jpg"')

end

# 2.归一化显示

pro draw_example2
file = FILEPATH('mineral.png', $SUBDIRECTORY = ['examples', 'data']) image = READ_PNG(file, red, green, blue) imageSize = SIZE(image, /DIMENSIONS) DEVICE, DECOMPOSED = 0 TVLCT, red, green, blue WINDOW, 0, XSIZE = imageSize[0], YSIZE = imageSize[1],$
TITLE = 'Original Image'
TV, image

WINDOW, 1, TITLE = 'Histogram of Image'
PLOT, HISTOGRAM(image), /XSTYLE, /YSTYLE, $;这里似乎只能对二维数组进行统计 TITLE = 'Mineral Image Histogram',$
XTITLE = 'Intensity Value', $YTITLE = 'Number of Pixels of That Value' p1=plot(HISTOGRAM(image),color='red',name='PA',symbol=2,xtitle='阈值',ytitle='精度') equalizedImage = HIST_EQUAL(image) WINDOW, 2, XSIZE = imageSize[0], YSIZE = imageSize[1],$
TITLE = 'Equalized Image'
TV, equalizedImage

end

05-16
07-20
03-11 1135
03-04 410
04-27