-1

I need equalize the gray level to 128 of an image and save it. After I have show the difference between the original and the new image and show the histagram of both images.

OBS: If you do the convertion using this image and upload it will be a great help for me now.

Lucas Silva
  • 1,361
  • 1
  • 13
  • 18

1 Answers1

1

If it is an issue of your R version, check out this other answer.

Otherwise you may want to use imagemagick if it's more appropriate for what you want to do. Maybe something like this:

convert [image.png] -colorspace gray -channel lightness -equalize -colorspace RGB [output.png]
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
linden
  • 127
  • 1
  • 7
  • This will equalize to 128 gray levels? In Matlab, the exactly function that does what I need is histeq(image, 127), but I need do that in R. – Lucas Silva Oct 29 '16 at 00:51