Histogram of a gray image in MATLAB | Digital image processing part-8

Поділитися
Вставка
  • Опубліковано 15 вер 2024
  • Histogram of an image in MATLAB | Digital image processing part-8
    An image histogram is a chart that shows the distribution of intensities in an indexed or grayscale image. The hist function creates a histogram plot by defining n equally spaced bins, each representing a range of data values, and then calculating the number of pixels within each range.

КОМЕНТАРІ • 4

  • @shadmansakeeb5230
    @shadmansakeeb5230 2 роки тому +1

    There is a bug in the code. Since the array indexing for MATLAB starts from 1, compared to other languages where it starts from 0; this code in the video will generate an indexing error if value of any pixel g(i,j) is 0 which will render arr(m) to arr(0) hence the error. The correction would be as follows:
    initiate a variable : n = 0 : 255;
    line 12 : arr(g(i,j) + 1) = arr(g(i,j) + 1) +1;
    stem(n , arr);

  • @RISHUKUMAR-gy7ur
    @RISHUKUMAR-gy7ur 4 роки тому

    I am 1st😃😃

  • @claudiapatricia5406
    @claudiapatricia5406 3 роки тому

    Would it be possible to actually count which is proportion of ecah color in the original imagine? Could I use digital image processing to sort and classify and imagine based on the amount of an specific color pixels on it? for example what % of green color exist on the imagine??

  • @StrangeParticl
    @StrangeParticl 4 роки тому

    thank you for that demo can you send me the code