function pix = findSeam_Greedy_sol(energy)

Pot = energy;
pix = [];
pix(1) = find(Pot(1,:) == min(Pot(1,:)),1);

for ii=2:size(Pot,1)
    %create list of next three options
    options = [ Pot(ii,pix(ii-1)) ];
    if pix(ii-1) == 1
        options = [ options 10000000 ];
    else
        options = [ options Pot(ii,pix(ii-1)-1) ];
    end
    if pix(ii-1) == size(Pot,2)
        options = [ options 10000000 ];
    else
        options = [ options Pot(ii,pix(ii-1)+1) ];
    end
    idx = find( options == min(options) );
    if idx ==1 %The lowest energy step is straight down
    pix(ii) = pix(ii-1);
    elseif idx ==2 %The lowest energy step is to the left
        pix(ii) = pix(ii-1) -1;
    else %The lowest energy step is to the right
        pix(ii) = pix(ii-1) +1;
    end

end