+ Post New Thread
Results 1 to 14 of 14
  1. #1
    Newbie level 5
    Points: 350, Level: 3

    Join Date
    Oct 2011
    Posts
    8
    Helped
    0 / 0
    Points
    350
    Level
    3

    Image Processing in FPGA

    Dear all,
    I did canny edge detection in matlab, now I want to do the same in FPGA. Please tell me how can I load image file into FPGA. Here is my doubt,

    1) The image file size is 256*256, but when I convert it into .coe/text format, image becomes 8*65536 size, how can I analyze it??? All my analysis is based on pixel values(gray scale)!
    2) What are the possible ways of doing this in FPGA?, I can use any FPGA boards(Spartan, vertex,altera etc.)

    Thanks in Advance!!

    F JOe

  2. #2
    Advanced Member level 5
    Points: 36,316, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,638
    Helped
    1933 / 1933
    Points
    36,316
    Level
    46

    Re: Image Processing in FPGA

    256x256 is 65536. You know its 256x256, so you just keep track of where you are. How you analyse it is up to you.

    there are lots of ways. Image processing is often done in fpga. I suggest finding a good book ln digital design.



  3. #3
    Newbie level 5
    Points: 350, Level: 3

    Join Date
    Oct 2011
    Posts
    8
    Helped
    0 / 0
    Points
    350
    Level
    3

    Re: Image Processing in FPGA

    Quote Originally Posted by TrickyDicky View Post
    256x256 is 65536. You know its 256x256, so you just keep track of where you are. How you analyse it is up to you.

    there are lots of ways. Image processing is often done in fpga. I suggest finding a good book ln digital design.

    Thank you !!



    •   AltAdvertisment

        
       

  4. #4
    Full Member level 5
    Points: 3,271, Level: 13
    Achievements:
    7 years registered
    amitjagtap's Avatar
    Join Date
    Jan 2007
    Posts
    304
    Helped
    42 / 42
    Points
    3,271
    Level
    13

    Re: Image Processing in FPGA

    you can use MATLAB to read an image in ‘jpg’ format and to convert it to txt file. read image using txt format. try to keep the image format in 256*256 size. you can use virtex 4/5/6 FPGA and Spartan-6 and above... Spartan 3 FPGA may give resource crunches if low logic device is selected...
    "Doubt grows with knowledge."
    "The best way to have a good idea is to have a lot of ideas"....Linus Pauling



    •   AltAdvertisment

        
       

  5. #5
    Newbie level 5
    Points: 350, Level: 3

    Join Date
    Oct 2011
    Posts
    8
    Helped
    0 / 0
    Points
    350
    Level
    3

    Re: Image Processing in FPGA

    Quote Originally Posted by amitjagtap View Post
    you can use MATLAB to read an image in ‘jpg’ format and to convert it to txt file. read image using txt format. try to keep the image format in 256*256 size. you can use virtex 4/5/6 FPGA and Spartan-6 and above... Spartan 3 FPGA may give resource crunches if low logic device is selected...
    Thank you, let me try with that, I will keep update both progress and issues ...



  6. #6
    Advanced Member level 1
    Points: 3,186, Level: 13

    Join Date
    Feb 2012
    Location
    Jeonju, South Korea
    Posts
    467
    Helped
    26 / 26
    Points
    3,186
    Level
    13

    Re: Image Processing in FPGA

    Quote Originally Posted by TrickyDicky View Post
    256x256 is 65536. You know its 256x256, so you just keep track of where you are. How you analyse it is up to you.

    there are lots of ways. Image processing is often done in fpga. I suggest finding a good book ln digital design.
    Hi
    do we not need any external memory here. Is the fpga it self ok and enough for all this?



    •   AltAdvertisment

        
       

  7. #7
    Advanced Member level 5
    Points: 36,316, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,638
    Helped
    1933 / 1933
    Points
    36,316
    Level
    46

    Re: Image Processing in FPGA

    It depends on the fpga.



  8. #8
    Newbie level 5
    Points: 99, Level: 1

    Join Date
    Feb 2013
    Location
    Coimbatore, India
    Posts
    8
    Helped
    0 / 0
    Points
    99
    Level
    1

    Re: Image Processing in FPGA

    I believe you could try with System Generator tool from xilinx to perform DSP operations on xilinx FPGA. The image can be easily loaded into the FPGA through few simulink blocks. The HW-Co simulation can be performed over the FPGA through the tool.



  9. #9
    Newbie level 5
    Points: 240, Level: 2

    Join Date
    Jul 2013
    Location
    Chennai
    Posts
    8
    Helped
    3 / 3
    Points
    240
    Level
    2

    Re: Image Processing in FPGA

    All you need is to create a ROM block to store a image in FPGA so that you could process..
    there are certain matlab codes available online to convert image to mif format so that you can store it in ROM block and process it..



  10. #10
    Full Member level 2
    Points: 1,658, Level: 9

    Join Date
    Nov 2009
    Location
    india
    Posts
    141
    Helped
    19 / 19
    Points
    1,658
    Level
    9

    Re: Image Processing in FPGA

    Well Its possible to use ROM block, but I would suggest to use an external memory. That way you will have your FPGA memory reserved for the processed data and run time data. I'm not sure how much data memory you are using currently, but as the Processing gets complex, data storage requirement boosts



  11. #11
    Newbie level 5
    Points: 240, Level: 2

    Join Date
    Jul 2013
    Location
    Chennai
    Posts
    8
    Helped
    3 / 3
    Points
    240
    Level
    2

    Re: Image Processing in FPGA

    When you go for off chip memory how could you access the data...need of driver isn't complex..???



  12. #12
    Advanced Member level 5
    Points: 36,316, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,638
    Helped
    1933 / 1933
    Points
    36,316
    Level
    46

    Re: Image Processing in FPGA

    Quote Originally Posted by Chan Dev View Post
    When you go for off chip memory how could you access the data...need of driver isn't complex..???
    You need a memory controller - which are readily available or you could write your own



    •   AltAdvertisment

        
       

  13. #13
    Full Member level 2
    Points: 1,658, Level: 9

    Join Date
    Nov 2009
    Location
    india
    Posts
    141
    Helped
    19 / 19
    Points
    1,658
    Level
    9

    Re: Image Processing in FPGA

    I dont think that will be much of a problem here. External memories are available with SPI communication, So using a SPI will not be a problem for you



  14. #14
    Newbie level 4
    Points: 89, Level: 1

    Join Date
    Oct 2013
    Posts
    6
    Helped
    0 / 0
    Points
    89
    Level
    1

    Re: Image Processing in FPGA

    HI there
    If you just want to load the image ,you can refer to this code:
    namespace RE__Test
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
    string fileName = "c:/Sample.png";

    REImage reImage = REFile.OpenImageFile(fileName);

    REFile.SaveImageFile(reImage, "c:/reimage.png", new PNGEncoder());
    }
    It is from an image processing tool.Hope to help you.



--[[ ]]--