GithubHelp home page GithubHelp logo

ju-chang / vivado-stream-convolution Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlzxy/vivado-stream-convolution

0.0 1.0 0.0 494 KB

Tcl 9.08% C++ 29.24% C 0.04% LLVM 6.65% Ada 38.65% Makefile 0.94% Batchfile 0.08% Verilog 5.78% VHDL 8.90% Pascal 0.02% JavaScript 0.47% Shell 0.16%

vivado-stream-convolution's Introduction

README

This is source code repository for my CSE_291: FPGA Image Processing Course Homework 2.

PID: A53095838

Link to the Video

https://www.youtube.com/watch?v=S7s1nkXVrHc

How to run the Project

## in the vivada_hls shell
git clone https://bitbucket.org/xyz0/cse_291_fpga_cv_hw2/ hw2  && cd hw2/sobel
vivado_hls ./script.tcl

Architecture

architecture.png

The program uses line buffer to receive streaming image pixel and sliding window buffer to multiply with the kernel. In order to make sure window buffer is filled properly at the beginning, the loop starts with i = 0, j = 0 and output_image[i-1][j-1], so the invalid computing result will be discarded and there is no if/else inside the loop to slow the program down.

Result Comparision

Old

old.jpg

Optimized

new.png

Test Bench

I compare every pixel value between the original sobel implementation and this optimized one to determine its correctness and accuracy.

//stuff
sobel(input_image, output_image);
sobel_truth(input_image, output_image_gold);
bool success = true;
for (i=1; i<359; i++)
   for (j=1; j<639; j++)
       if(!output_image[i][j] == output_image_gold[i][j]){
	    printf("Test failed at (%d,%d), truth = %d, yours = %d\n",i,j
			,output_image_gold[i][j],output_image[i][j]);
	    success = false;
	}

vivado-stream-convolution's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.