abimann
Member level 4
Hello everyone PlS help !!!
Is that is same FrameEdgeCount with summa in a following code ? or how to make this ?
Frame edge count i found in youtube in 2:41 . I want to use it to make autofocus for my camera. Code from github ,
Sobel fileter result , has some display problem cannot find out why.
Is that is same FrameEdgeCount with summa in a following code ? or how to make this ?
Frame edge count i found in youtube in 2:41 . I want to use it to make autofocus for my camera. Code from github ,
Code:
architecture Behavioral of edge_sobel is
begin
edge_sobel: process (pclk_i)
variable summax, summay : std_logic_vector(10 downto 0);
variable summa1, summa2 : std_logic_vector(10 downto 0);
variable summa : std_logic_vector(10 downto 0);
begin
if (pclk_i'event and pclk_i = '1') then
rsync_o <= rsync_i;
fsync_o <= fsync_i;
if fsync_i = '1' then
if rsync_i = '1' then
-- x2
summax:=("000" & pdata3)+("00" & pdata6 & '0')+("000" & pdata9)
-("000" & pdata1)-("00" & pdata4 & '0')-("000" & pdata7);
-- x2
summay:=("000" & pdata7)+("00" & pdata8 & '0')+("000" & pdata9)
-("000" & pdata1)-("00" & pdata2 & '0')-("000" & pdata3);
-- Here is computed the absolute value of the numbers
if summax(10)='1' then
summa1:= not summax+1;
else
summa1:= summax;
end if;
if summay(10)='1' then
summa2:= not summay+1;
else
summa2:= summay;
end if;
summa:=summa1+summa2;
summa_out<=summa;
-- Threshold = 127
if summa>"00001111111" then
pdata_o<=(others => '1');
else
pdata_o<=summa(DATA_WIDTH- 1 downto 0);
end if;
END IF;
end if;