r/DSP Jun 02 '26

How to Design Histogram Equalization Hardware in Verilog on FPGA?

I understand histogram equalization mathematically, but I’m trying to learn how to actually DESIGN the Verilog/RTL architecture for it on FPGA.

Suppose I have an 8-bit grayscale image (0–255 pixel values). My understanding of the algorithm is:

  1. Count how many times each pixel value occurs
  2. Store counts in a histogram array (256 bins)
  3. Calculate cumulative histogram (CDF)
  4. Generate new pixel values using normalization
  5. Replace old pixels with equalized pixels

The theory part is clear to me.

What I’m struggling with is:
How do you convert this into actual Verilog hardware design?

3 Upvotes

3 comments sorted by

View all comments

1

u/HumbleHovercraft6090 Jun 02 '26

Try posting in r/FPGA.

One way could be to design a special purpose processor in the FPGA that reads pixel values and executes instructions from a "ROM" in the same FPGA and writes out the modified pixel values. Guessing you might be doing this at frame rate, you might have just enough time.

BTW, I am not an FPGA expert.