Forum Discussion
Altera_Forum
Honored Contributor
9 years ago --- Quote Start --- I assume the code you have posted is incomplete, because it has syntax errors. Your current code is somply the sum of all bits of an array in parrallel. I assume ultimately your input will be an image? this would be streaming only 1 pixel per clock cycle. To check adjacent 1s you're going to need an algorithm to found out whether one is adjacent to another. And to explain: In a processor - in a CPU Thresholding - taking an image and transforming the raw data by setting specific values to 0 (those that fail to meet some threshold criteria, eg. the luminance value is below a given value) 300 Hz refresh - the frame rate of the image - the pixel rate was 27Mhz. --- Quote End --- i understand your explain. i have to use fpga for solve. so even though my english is poor i am going to explain to you my problem. 1024-pixel line scan camera is running 10KHz(line rate). i prepare the buffer : std_logic_vector 1023 downto 0. i am processing scan data[8-bit] with threshold value. if scan data[n] is bigger than threshold value, then buffer(n) = '1', or '0'. finally i get the 1024-bit buffer data. line rate is 10KHz. so every 100us, 1024-bit buffer data produced. i save 5-line data using buffer array. and every 100us, buffer array line-shift. i want to count linked 1's quantity in special 5X5 matrix(for example. pixel 0 to 4 and line 0 to 4). i have no idea to solve, so just all matrix pixel data added(your point out is right). would you let me know how to solve? thank you.