フィルターのクリア

How can I correction hue values of image

4 ビュー (過去 30 日間)
Fu-An Nung
Fu-An Nung 2016 年 10 月 17 日
コメント済み: Image Analyst 2016 年 10 月 17 日
How can I correction hue values of image
  2 件のコメント
Adam
Adam 2016 年 10 月 17 日
Correct them from what to what?
Fu-An Nung
Fu-An Nung 2016 年 10 月 17 日
I have a wrong tonal image.I want to make it have correct tonal.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2016 年 10 月 17 日
You need to snap an image of a color standard with known color values. The usual standard is the x-rite Color Checker Chart. Then you have known XYZ values. You can use least squares to derive a transform to convert your RGB values, of the color chips on a picture of that chart that you have taken, into XYZ values. Then you can use analytical formulas to convert XYZ into LAB or other calibrated color spaces.
  4 件のコメント
Fu-An Nung
Fu-An Nung 2016 年 10 月 17 日
編集済み: Image Analyst 2016 年 10 月 17 日
Excuse me I have run this code . but I only got a all black image. Did I do something wrong?
clc, clear;
fi = imread('sofa_1.jpg');
hsvImage = rgb2hsv(fi);
someFactor = 0.77; % or whatever.
hsvImage(:,:,1) = hsvImage(:,:,1)*someFactor ;
rgbImage = uint8(hsv2rgb(hsvImage));
imshow(rgbImage);
Image Analyst
Image Analyst 2016 年 10 月 17 日
Try this:
clc;
clearvars;
close all;
workspace;
fontSize = 15;
format compact
format short g;
rgbImage = imread('peppers.png');
subplot(2, 4, 1);
imshow(rgbImage);
axis on;
title('Original Image', 'FontSize', fontSize);
% Set up figure properties:
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Get rid of tool bar and pulldown menus that are along top of figure.
set(gcf, 'Toolbar', 'none', 'Menu', 'none');
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
hsvImage = rgb2hsv(rgbImage);
hImage = hsvImage(:, :, 1);
sImage = hsvImage(:, :, 2);
vImage = hsvImage(:, :, 3);
subplot(2, 4, 2);
imshow(hImage, [0, 1]);
title('Hue Image', 'FontSize', fontSize);
subplot(2, 4, 3);
imshow(sImage, []);
title('Saturation Image', 'FontSize', fontSize);
subplot(2, 4, 4);
imshow(vImage, []);
title('Value Image', 'FontSize', fontSize);
someFactor = 1.6; % or whatever.
% Use mod to "wrap around" values more than 1.
hImageNew = mod(hImage * someFactor, 1);
subplot(2, 4, 6);
imshow(hImageNew, [0, 1]);
title('New Hue Image', 'FontSize', fontSize);
% Create new image
hsvImage = cat(3, hImageNew, sImage, vImage);
% Convert back to RGB color space.
rgbImageNew = hsv2rgb(hsvImage); % It's double in the range of 0-1 here.
% Convert to uint8 in the range 0-255
rgbImageNew = uint8(255 * mat2gray(rgbImageNew));
subplot(2, 4, 5);
imshow(rgbImageNew);
title('Changed Image', 'FontSize', fontSize);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by