0

I'm new in c#. I want to draw a vertical histogram and a horizontal histogram from a png image. Is that possible and what I should use.

Here is what I did, but I can't save it into a bmp image :

public void Histogramme (string roi_Path_png)
{
    Bitmap image = AForge.Imaging.Image.FromFile(roi_Path_png);
    VerticalIntensityStatistics hist_vertical = new VerticalIntensityStatistics (image);
    Histogram histogram_vertical = hist_vertical.Gray;
    HorizontalIntensityStatistics hist_horizontal = new   
                                                   HorizontalIntensityStatistics(image);
    Histogram histogram_horizontal = hist_horizontal.Gray;  
}
TylerDurden
  • 1,632
  • 1
  • 20
  • 30
user2827482
  • 199
  • 1
  • 2
  • 9

1 Answers1

0

Two parts for your solution.

  1. To get vertical and horizontal histogram from image, Refer Vertical Horizontal Aforge for a detailed code block.

  2. For saving the image as BMP, check out the Bitmap class, specifically Bitmap.Save method from MSDN.

Community
  • 1
  • 1
LakshmiNarayanan
  • 1,158
  • 9
  • 12