Question

In: Electrical Engineering

Saliency detection using scale change.you have to take two window of different sizes and calculate the...

Saliency detection using scale change.you have to take two window of different sizes and calculate the saliency by considering the feature vector.

if you know the answer then only write or else leave for other.

image processing ELECTRICAL.

Solutions

Expert Solution


i1 = imread('input_image.jpg');%Provide input image path
d= size(i1);
w = d(2);h = d(1);
md = min(w, h);%minimum dimension
cform = makecform('srgb2lab', 'whitepoint', whitepoint('d65'));
lab = applycform(i1,cform);
l = double(lab(:,:,1));
a = double(lab(:,:,2));
b = double(lab(:,:,3));

smT = zeros(h, w);
off1 = int32(md/2); off2 = int32(md/4); off3 = int32(md/8);
for j = 1:h
    y11 = max(1,j-off1); y12 = min(j+off1,height);
    y21 = max(1,j-off2); y22 = min(j+off2,height);
    y31 = max(1,j-off3); y32 = min(j+off3,height);
    for k = 1:w
        x11 = max(1,k-off1); x12 = min(k+off1,width);
        x21 = max(1,k-off2); x22 = min(k+off2,width);
        x31 = max(1,k-off3); x32 = min(k+off3,width);
        lm1 = mean2(l(y11:y12,x11:x12));am1 = mean2(a(y11:y12,x11:x12));bm1 = mean2(b(y11:y12,x11:x12));
        lm2 = mean2(l(y21:y22,x21:x22));am2 = mean2(a(y21:y22,x21:x22));bm2 = mean2(b(y21:y22,x21:x22));
        lm3 = mean2(l(y31:y32,x31:x32));am3 = mean2(a(y31:y32,x31:x32));bm3 = mean2(b(y31:y32,x31:x32));
      
        cv1 = (l(j,k)-lm1).^2 + (a(j,k)-am1).^2 + (b(j,k)-bm1).^2;
        cv2 = (l(j,k)-lm2).^2 + (a(j,k)-am2).^2 + (b(j,k)-bm2).^2;
        cv3 = (l(j,k)-lm3).^2 + (a(j,k)-am3).^2 + (b(j,k)-bm3).^2;
        smTj,k) = cv1 + cv2 + cv3;
    end
end

imshow(smT,[]);


smT is the final result. if you have any doubt regarding the question please comment. Thank you


Related Solutions

A trucking firm hauls loads of different sizes between different cities. Use of large scale direct...
A trucking firm hauls loads of different sizes between different cities. Use of large scale direct hauls are cheaper and more profitable than individual hauls by small truckers. Further the question arises as to whether a large trucking firm enjoys cost advantages in operating in both direct quick hauls and indirect lower but less expensive hauls. Explain the concept of economies to scale and economies to scope with reference to the above situation.
5. Below is a table showing composition data for clove oil, obtained using two different detection...
5. Below is a table showing composition data for clove oil, obtained using two different detection methods (with the same sample), FID and mass spectrometry. Explain why the composition (based on relative peak areas of the GC trace) is different for these data sets. Are either of these the “real” composition of the clove oil? Hint: Response factor FID MS detector Area Area% Area Area% Eugenol 86.78 87.73 137.95 75.84 Caryophyllene 2.03 2.05 10.26 5.64 Eugenol Acetate 10.11 10.22 33.68...
Describe two kinds of scale economies. What different implications do the two kinds of scale economies...
Describe two kinds of scale economies. What different implications do the two kinds of scale economies have for regional economic development?
Describe two kinds of scale economies. What different implications do the two kinds of scale economies...
Describe two kinds of scale economies. What different implications do the two kinds of scale economies have for regional economic development?
a. Using the data in the popup​ window, LOADING... ​, calculate the​ holding-period returns for each...
a. Using the data in the popup​ window, LOADING... ​, calculate the​ holding-period returns for each of the months. b. Calculate the average monthly return and the standard deviation for both the​ S&P 500 and Nike. c. Develop a graph that shows the relationship between the Nike stock returns and the​ S&P 500 Index.​ (Show the Nike returns on the vertical axis and the​ S&P 500 Index returns on the horizontal​ axis.) d. From your​ graph, describe the nature of...
1. Could two economies of different sizes ever have the same exact steady-state conditions when being...
1. Could two economies of different sizes ever have the same exact steady-state conditions when being analyzed through the Solow Growth model? Justify your answer. 2.Could two economies of different sizes ever have the same exact steady-state conditions when being analyzed through the Solow Growth model? Justify your answer. 3. Improved technology is likely to A) displace worker, causing high unemployment. B) increase the marginal product of labor. C) reduce productivity. D) reduce wages. 4. From 1995 to 2008, the...
Take the exchange rates of two different nations at two different time intervals and determine the...
Take the exchange rates of two different nations at two different time intervals and determine the DER and IER with reference to one country. Discuss the impact on import due to changes in the exchange rate upon any one nation. Also discuss the impact on export due to change in the exchange rate upon the same nation. Discuss the strength or weakness of one currency over the period of time with reference to other currency.
Given a tumorous brain image .take out the t umour using ittikoch saliency detection method Given...
Given a tumorous brain image .take out the t umour using ittikoch saliency detection method Given a tumorous brain image .take out the tumour using ittikoch saliency detection method need matlab code if you know then do or else leave it for other.dont try if you dnt know Image processing.electrical
Analyze TWO effects of relay burden characteristics if different types and sizes of wires are used...
Analyze TWO effects of relay burden characteristics if different types and sizes of wires are used in the system.
Write a method that takes two Sorted Arrays of different sizes and merges them into one...
Write a method that takes two Sorted Arrays of different sizes and merges them into one sorted array, and use the method to write a full recursive Merge Sort Algorithm.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT