Skip to content
tezvyn:

FPGA in Computer Vision

Source: ni.comHardHow cards are made

An FPGA is reconfigurable silicon wired into a custom digital circuit rather than programmed as instructions, letting a vision pipeline like demosaicing and feature extraction run in dedicated hardware with low latency and high throughput per watt.

Why it exists

CPUs process instructions one after another and GPUs process many threads in parallel but still fetch and decode instructions, so both pay overhead for every pixel operation. Real time vision, on a drone avoiding obstacles or a factory camera rejecting defective parts, cannot tolerate the latency jitter of a general purpose scheduler or the power budget of a discrete GPU. FPGAs exist to remove that overhead by turning the algorithm into a physical circuit.

The mental model

Think of a CPU as a single fast cook following one recipe card at a time, and a GPU as thousands of cooks each following the same recipe on a different plate. An FPGA is a kitchen built and wired specifically for one recipe, with a dedicated station for chopping, another for searing, another for plating, connected by conveyor belts so a new plate finishes every second, no reading of recipe cards required.

How it works

An FPGA is an array of configurable logic blocks and interconnect wiring. Engineers describe a vision pipeline, such as sensor input, noise reduction, edge detection and object bounding, in a hardware description language like Verilog or VHDL, or increasingly in high level synthesis from C or OpenCL. A toolchain synthesizes that description into a specific arrangement of logic gates and routes signals between them. Because each pipeline stage gets its own physical hardware, stages run concurrently in a deep pipeline, and a new result can emerge every clock cycle once the pipeline is full.

When it matters

FPGAs matter when latency must be deterministic, power is constrained, and the algorithm is fixed enough to justify hardware design time, for example machine vision on a production line, radar or lidar preprocessing, or camera ISPs. The footgun is treating an FPGA like a faster CPU: any change to the algorithm can mean resynthesizing and reverifying the circuit, a process that can take hours, and real benefit requires understanding memory bandwidth and pipeline depth, not just porting existing software.

A concrete example

A factory quality camera running at 500 frames per second needs to flag a scratched bottle before it leaves the inspection station three milliseconds later. A Xilinx Zynq FPGA does demosaicing, thresholding and connected component labeling entirely in fabric logic, handing the CPU only the final pass or fail decision, keeping every frame's processing time identical regardless of scene complexity.

Interview question

Why do engineers choose an FPGA over a GPU for a real time vision pipeline with a fixed algorithm?

  • a.Because FPGAs can run any deep learning model without any modification while GPUs cannot
  • b.Because FPGAs are always cheaper per unit than GPUs at any production volume
  • c.Because a fixed pipeline can be built as dedicated parallel hardware, giving deterministic low latency and low power instead of scheduling instructions on shared coresCorrect
  • d.Because FPGA code is easier to write and debug than CUDA or OpenCL code
Why?

FPGAs win when the workload is fixed and latency and power predictability matter, since the algorithm becomes physical hardware instead of instructions competing for a shared scheduler. Cost and ease of development actually favor GPUs, which is why A is the only accurate tradeoff.

Just read this? Test yourself on what you have been reading.

Read the original → ni.com

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles