The image calculation found that they are all black or all white.
Show older comments
The image calculation found that they are all black or all white.
my coding
img1= imread('SCM Data111.jpg');
img = (-0.18 / (-0.28 / (45.39 /img1 - 1))+1) * 5.3;
imwrite(img, 'n_.jpg');

Can you tell me the reason why the subsequent pictures are all black and how to solve it?
Accepted Answer
More Answers (1)
Image Analyst
on 28 Apr 2024
img1 is an array so you need to use dot division
img = (-0.18 ./ (-0.28 ./ (45.39 ./ img1 - 1)) + 1) * 5.3;
And double check your parentheses to make sure they're correct. For example is
(45.39 ./ img1 - 1)
supposed to be
((45.39 ./ img1) - 1)
or
(45.39 ./ (img1 - 1))
Categories
Find more on Computer Vision Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
