Converting mean(mean(image)) of image into c

1 visualizzazione (ultimi 30 giorni)
I am new to matlab and I want to know how do i write the fuction of matlab imread, rgb2gray & mean(mean(image)) into c

Risposte (1)

KALYAN ACHARJYA
KALYAN ACHARJYA il 19 Mag 2019
im=imread('iamge_file_name.jpg');
grayImage=rgb2gray(image1);
result=mean(grayImage);
C Code Generation from MATLAB check here
Regarding Matlab function
function output=fun_name(inputs)
......do
..do
end
  1 Commento
Muhammad Hilmi Azman
Muhammad Hilmi Azman il 19 Mag 2019
I have this code in matlab:
img = imread ('test.jpg');
I = rgb2gray(img);
meanIntensityValue = mean(mean(I));
[rows, columns, depth]=size(I);
In order to convert the script so I just need to copy this to the fuction like:
function output=fun_name(inputs)
img = imread ('test.jpg');
I = rgb2gray(img);
meanIntensityValue = mean(mean(I));
[rows, columns, depth]=size(I);
end

Accedi per commentare.

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by