I need a matlab code for normalizing this chart between 0 and 255

I projected a colored sinusoidal fringe patterns with amplitude 255 (0-255), then I captured image of the pattern with a camera. I found that each fringe has different amplitude as shoown in the figure. I need a matlab code for nomalizing these ampliudes to return to its original values

回答 (1 件)

Rik
Rik 2019 年 8 月 27 日
編集済み: Rik 2019 年 8 月 27 日

0 投票

A first approximation could be something like this:
%generate some data
t=1:200;
data=80+70*sin(t/4)+rand(size(t))*5;
data=data-min(data(:));
data=data*255/max(data(:));
A better solution is probably to fit a function to your data and model the minimum and maximum values.

製品

リリース

R2018a

タグ

質問済み:

2019 年 8 月 27 日

編集済み:

Rik
2019 年 8 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by