How to couple an efficiency map image with its corresponding effciency values?

8 views (last 30 days)
Hi,
I have to performed this task, but I cannot undertand how to do it.
I have the image of an efficiency map of an electric motor (in Torque-speed plane), where the color of a pixel indicates the effciency of that operating point:
Motore 205W-08026-ABC - Ritagliata.png
I also have the corresponding scale, where the color of the first row of pixels corresponds to an efficiency of 0.98, while the last row corresponds to an efficiency of 0.5; then the efficiencies of the intermidiate rows are interpolated with these two values:
Scala 205W-08026-ABC Ritagliata.PNG
With this information, how can I find the value of efficiency of each pixel of the efficiency map?
Thanks in advance!

Answers (1)

Raunak Gupta
Raunak Gupta on 18 Nov 2019
Hi,
As per my understanding the scale value are correlated with the efficiencies that are mentioned. So, from the scales color value and corresponding efficiency values, a system of linear equations can be set up. From the linear equations a vector of coefficient can be found that will used to calculate efficiency value for any other given point.
Following code will provide some help.
% Loading the efficiency map image
efficiency_map = double(imread('efficieny_map.png'));
% Loading the scale image
scale = double(imread('scale_image.png'));
% As in one row the pixel value are same in scale its better to take only
% one value out of it
scale = scale(:,1,:);
scale = reshape(scale,[size(scale,1),size(scale,3)]);
% Creating the corresponding efficiency values from end point for each
% entry in scale
efficieny = linspace(0.98,0.5,size(scale,1)).';
% Corresponding coefficient for calculating the relationship
coeff = scale\efficieny;
% Testing with any pixel value
test = reshape(efficiency_map(1,1,:),[1,3]);
test_efficiency = test*coeff;
  2 Comments
Emanuele Piatti
Emanuele Piatti on 20 Nov 2019
Hi,
I thank you so much for the help.
I have tried to apply your procedure for each pixel of the image:
% Loading the efficiency map image
efficiency_map = double(imread('Motore 205W-08026-ABC - Originale.png'));
% Loading the scale image
scale = double(imread('Scala 205W-08026-ABC Ritagliata.png'));
% As in one row the pixel value are same in scale its better to take only one value out of it
scale = scale(:,1,:);
scale = reshape(scale,[size(scale,1),size(scale,3)]);
% Creating the corresponding efficiency values from end point for each entry in scale
efficiency = linspace(0.98,0.5,size(scale,1)).';
% Corresponding coefficient to calculate the relation
coeff = scale\efficiency;
% Testing with any pixel value
row=size(efficiency_map, 1);
col=size(efficiency_map, 2);
efficiency_test=zeros(size(efficiency_map, [1 2]));
for ii=1:row
for jj=1:col
test = reshape(efficiency_map(ii,jj,:),[1,3]);
efficiency_test(ii, jj) = test*coeff;
end
end
figure
surf(1:col, 1:row, efficiency_test);
Finally, I get this result:
Efficiency_Map.JPG
On my own, I had already reached a result like this; in my first message I have tried to be the most generic possible, to avoid influence the reasonings of the people reading my message.
I find some difficultis in dealing with the black lines present in the originary image of the efficiency map, since they distort the values of efficiency on the reconstructed map. Furthermore, it seems that the the points with the highest efficiency are reconstructed as low efficiency point, and vice versa.
I thank in advance anyone who could help me.
Raunak Gupta
Raunak Gupta on 20 Nov 2019
Hi,
surf plot is a way to visualize data that is calculated. Here since the corner of the efficiency image that is read have black boundaries so from the coefficient calculated the value return is not required to be in range of efficiency that you have mentioned since the black color is not present in the scale image.
You may try to assign efficiency to all the possible pixel values so that every pixel in original image have the values in the required range of efficiency otherwise the black lines that are present are simply because the color in original efficiency image doesn't have a corresonding efficiency value while the system of linear equations are formed.

Sign in to comment.

Categories

Find more on Image Processing 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!