answersLogoWhite

0


Best Answer

In matlab you can type

>> help conv2

I am also trying to find it in C, but no success yet. I will try to make my own. It should be easy just some for loops and if conditions.

----

If your convolution kernel is [1 0 1] and you apply it to a 2-D matrix or an image, then it will interpolate the value for the middle pixel or point by average values of right and left pixels. It is a sliding window run from left to right on the image, shifting one pixel at a time and interpolating. This is done to find simple contrast edges in an image.
Hope this helps.
I was also hitting my head before I could understand it.

----

User Avatar

Wiki User

βˆ™ 15y ago
This answer is:
User Avatar
More answers
User Avatar

AnswerBot

βˆ™ 6mo ago

In C, you can implement a convolution function by iterating over each element in the input arrays, multiplying the corresponding elements, and summing up the results. The size of the output array will be the sum of the lengths of the input arrays minus 1. Remember to handle boundary conditions like array index out of bounds.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Convolution function in C
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Biology

The primary function of NADH and FADH2 is?

The primary function of NADH and FADH2 is to transfer electrons in cellular respiration. These molecules are key players in the electron transport chain, where they donate electrons to help generate ATP, the cell's energy currency.


How do you copy a function to another cell?

To copy a function to another cell, you can simply click on the cell containing the function, then use the keyboard shortcuts Ctrl+C to copy, and Ctrl+V to paste it into the desired cell. Alternatively, you can also click and drag the fill handle (a small square at the bottom right corner of the cell) to the cell where you want to copy the function.


Which could be its function A. Storing energy B. Transporting blood C. Forming connective tissue D. Moving material out of cells?

A. Storing energy


What is the function of menisci?

Menisci are C-shaped discs of cartilage in the knee joint that act as shock absorbers, help with load distribution, and provide stability to the joint during movement. They also aid in lubricating the joint and enhancing its overall function.


Why enzymes activity slows down and eventually stops above 35 degree C and below 0 degree C explain why?

Enzymes are proteins that have specific 3D structures necessary for their function. At temperatures above 35Β°C, thermal energy can disrupt the enzyme's structure through denaturation, reducing its activity. At temperatures below 0Β°C, the cold can slow down the movement of molecules, including enzymes, making their interactions less frequent and slowing down their activity. Both high and low temperatures can negatively impact an enzyme's structure and function.

Related questions

C program for 2D convolution?

You can use ImageMagick library and use 'convolve' function.


Difference between linear and circular convolution?

circular convolution is used for periodic and finite signals while linear convolution is used for aperiodic and infinite signals. In linear convolution we convolved one signal with another signal where as in circular convolution the same convolution is done but in circular pattern ,depending upon the samples of the signal


Code for circular convolution matlab?

Please check the help files of the matlab circular convolution . Matlab already has a readymade function for it.


What is the difference between continuous and discrete convolution?

A convolution is a function defined on two functions f(.) and g(.). If the domains of these functions are continuous so that the convolution can be defined using an integral then the convolution is said to be continuous. If, on the other hand, the domaisn of the functions are discrete then the convolution would be defined as a sum and would be said to be discrete. For more information please see the wikipedia article about convolutions.


What is convolution in science?

Convolution in science is a mathematical operation that combines two functions to produce a third function representing how one function modifies the other. In image processing and signal processing, convolution is used to process and analyze data by applying a filter or kernel to an input signal. It is a fundamental concept that allows for extracting features or enhancing signals in various scientific fields.


Why is the need for circular convolution?

for finding convolution of periodic signals we use circular convolution


What is the function of the Pre Central gyrus?

The precentral gyrus is the posterior convolution of the frontal lobe. The function is to control voluntary muscle movements in the body.


What is convolution?

In mathematics and, in particular, functional analysis, convolution is a mathematical operator which takes two functions f and g and produces a third function that in a sense represents the amount of overlap between f and a reversed and translated version of g. A convolution is a kind of very general moving average, as one can see by taking one of the functions to be an indicator function of an interval. we mainly use impulse functions to convolute in dicreate cases


Can you perform a linear convolution from circular convolution?

yes we can perform linear convolution from circular convolution, but the thing is zero pading must be done upto N1+N2-1 inputs.


Diff between linear and circular convolution?

there is a big difference between circular and linear convolution , in linear convolution we convolved one signal with another signal where as in circular convolution the same convolution is done but in circular patteren ,depending upon the samples of the signal


State and prove convolution theorem for fourier transform?

Convolution TheoremsThe convolution theorem states that convolution in time domain corresponds to multiplication in frequency domain and vice versa:Proof of (a):Proof of (b):


Applications of Circular convolution?

for finding convolution of periodic signals we use circular convolution