- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
I need to implement Linear to Logarithmic conversion using Verilog HDL on overexposed and underexposed pictures through Look Up Tables. But, I lack information on this. Can anyone provide me some good docs. or some good links for the same. Thank you, -Amit GargLink Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
in my opinion, the first question you should ask yourself is the data format (in linear) and the value range you want to use: e.g: float, double, fixedpoint, signed/unsigned integer, maybe 7 bits integer and so on. If you have determined this very first issue you can go on with e.g. Matlab: you could approximate the log curve you need with lookup tables, raw+fine lookup tables and maybe an interpolation, or an algorithmic approach to approximate the log curve with polynomials. I think there is plenty of information an how to implement this special functionality on the Internet => google, ieee, and so on. Did you take a sight on opencores.org? Maybe there is a finished core available. regards, lestard- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes kaz, this is a good document, i found it yesterday only.
Thanx The procedure they have explained involves division of real numbers. I think this might reduce the frequency of the design. Also I think the alternate of multiplier also won't help, as the divisor (no.) is not constant, it will change with every input data.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this is gamma correction, right? the simplest method would be a lookup table for under-exposed and one for over-exposed. for finer tuning you could make more tables or do some kind of interpolation/"fudging" between the tables and a linear curve.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- this is gamma correction, right? the simplest method would be a lookup table for under-exposed and one for over-exposed. for finer tuning you could make more tables or do some kind of interpolation/"fudging" between the tables and a linear curve. --- Quote End --- not exactly but yes it is similar to gamma correction. can you plz explain a bit on the method you told above ...... may with a small example. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what i need is a whiteboard. :)
i'll assume 8-bit data. so i'm picturing 2 LUT (256x8-bit), one for overexposed and one for underexposed. both LUT have extreme correction values in them, the most you'd want to correct in either direction. to get less correction do a weighted average between one LUT and the linear/no-change curve. so: output_value = weight*LUT[input_num] + (1-weight)*input_num where: -input_num is the input pixel value -LUT[input_num] is the lookup table value associated with the input pixel value -weight is the weighting factor, how much correction to apply -output_value is your output pixel value so your weight width will depend on how many "settings" you want, how fine the tuning is. if you only want 4 settings of underexposure/overexposure correction you need 2 bits, etc. just take the 8 MSB to truncate or add some logic to round if that's more desirable. i'm sure there are better methods, but this one's cheap and easy. i'm not sure how well the linear interpolation of the LUT is going to work in application, but its worth trying.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page