Questions tagged [histogram-equalization]

23 questions
36
votes
10 answers

OpenCV Python equalizeHist colored image

I need to do a histogram equalization for a colored image. First I convert the colored image to gray and give it to the equalizeHist function: image = cv2.imread("photo.jpg") image = cv2.cvtColor(image,…
32
votes
3 answers

Histogram equalization not working on color image - OpenCV

I am trying to perform a histogram equalization using OpenCV using the following function Mat Histogram::Equalization(const Mat& inputImage) { if(inputImage.channels() >= 3) { vector channels; …
user349026
5
votes
1 answer

Adaptive Histogram Equalization (AHE) Algorithm

I've been trying to figure out the algorithm to perform full adaptive histogram equalization (without interpolating). However, I still seem to be missing a piece and haven't managed to get the result image right. Here are the steps that I followed,…
5
votes
1 answer

Histogram equalization for python

I have this routine to do histogram equalization of a photo: def histeq(im,nbr_bins=256): #get image histogram imhist,bins = histogram(im.flatten(),nbr_bins,normed=True) cdf = imhist.cumsum() #cumulative distribution function cdf = 255…
Nick
  • 9,285
  • 33
  • 104
  • 147
5
votes
3 answers

I need to do a histogram stretch

I have an array of BitmapFrames and need to do a histogram stretch. I know this is different from a histogram equalization, and what the final outcome is... sorta. the problem is I have absolutely no idea what to do after I get the histogram. So far…
3
votes
1 answer

Histogram Equalization on specific area using mask

I am working with images that I need to process. However, only specific areas of these images are of interest so for each image I have a corresponding mask (that can be of any shape, not a bounding box or anything specific). I would like to do…
2
votes
1 answer

How to do histogram matching with normal distribution as reference?

I have an image and I want to do histogram matching with normal distribution as reference. I've seen this link: Histogram matching with OpenCV, scikit-image, and Python. According to this link, the reference must be an image. But I don't have any…
2
votes
2 answers

local histogram equalization in matlab / python

i am very new in matlab. i want to write the code for local histogram equalization . i have been written code for global histogram equalization and i know that local equalization means do equalization for each part of image seperately but my…
2
votes
1 answer

Histogram Equalization Results

I am trying to code histogram equalization by my self, but the results are different from the built in function in matlab histeq. Any suggestions why is this happening?. I attached the code and the results. %% Histogram Equalization close all clear…
Fadwa
  • 1,717
  • 5
  • 26
  • 43
1
vote
0 answers

Color enhancement using PIL: How to compute color value?

I am using these functions to modify the values of brightness, contrast and sharpness. My default values are 128, 24, 4 respectively. I extracted these values. I don't know how to extract the value of the color to modify it in the same way. import…
1
vote
0 answers

Histogram Equalization: Converting histogram to 32 bins

I'm doing image histogram equalization . The code works fine for an image with 256 bin histogram, but, when I try to convert histogram to 32 bin,the image quality detoriates. Any ideas how to fix that? My…
user3830162
1
vote
1 answer

Using histogram equalization for 3 regions in histogram

I'm trying to develop an application that will stretching the histogram for each region.. In one picture, the histogram will be divided into 3 region which are dark, mid and bright region. the range will be: [0 85], [85 171] and [171 255] my problem…
Sumi
  • 21
  • 1
0
votes
0 answers

Special criteria for histogram equalization measure

let us consider following code -which reads image, applies histogram equalization procedure and display both result : import cv2 import numpy as np img = cv2.imread('original.png', cv2.IMREAD_GRAYSCALE) assert img is not None, "file could not be…
0
votes
0 answers

CLAHE Implementation produces unexpected output

I am trying to implement CLAHE(contrast-limited adaptive histogram equalization) algorithm using python3, numpy and cv2. I am using the slower non-interpolation method. Just dividing image to tiles and trying to equalize histograms of sub-images to…
0
votes
1 answer

Histogram Matching on Sentinel 2 satellite images

I try to apply histogram matching based on OpenCV and Scikit image on Sentinel 2 data, similar to https://www.geeksforgeeks.org/histogram-matching-with-opencv-scikit-image-and-python. Sentinel 2 bands have a value range between 0 and 10000, also…
MikeHuber
  • 575
  • 2
  • 7
  • 13
1
2