How to couple an efficiency map image with its corresponding effciency values?
8 views (last 30 days)
Show older comments
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:

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:

With this information, how can I find the value of efficiency of each pixel of the efficiency map?
Thanks in advance!
0 Comments
Answers (1)
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
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.
See Also
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!