473,378 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

image processing style (2D kernel) convolutions?

It appears that Numeric only supports 1D convolutions. I need to
apply a 2D kernel such as
0 1 0
1 -4 1
0 1 0
to an image. Is there such a capability in Python/Numeric? It
appears that numarray has convolve2d(), but I don't have it
available where I'm working.

(I could express the problem better but I have a feeling that
people who know the answer know exactly what I mean. Tell me if
that's not true.)

Thank you.

--kyler
Jul 18 '05 #1
1 2180
Well, it seems that you could convolve each row of the input image with
each row of the kernel, with the rows offset from each other. Then sum
the 3 convolved rows to get the output row

I know this isn't the right notation, and doesn't deal with r-1 or r+1
being out of range..
for r in range(input_height):
output[r] = (convolve(input[r-1], filter[0])
+ convolve(input[r], filter[1])
+ convolve(input[r+1], filter[2])

Jeff

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Maxwell2006 | last post by:
Hi, I am developing a simple image upload asp.net page and I am looking for a simple image processing component to be able to change the image resolution of jpg images and also reduce the...
10
by: stonny | last post by:
Hi, I am converting my matlab program into C/C++. I need to change some image processing toolbox functions into C/C++, such as edge detection, mathematical morphology. Is there any place that I...
10
by: Enrique Cruiz | last post by:
Hello all, I am currently implementing a fairly simple algorithm. It scans a grayscale image, and computes a pixel's new value as a function of its original value. Two passes are made, first...
5
by: edurand | last post by:
Hi, We are are pleased to announce the version 3.0 of the image processing library 'Filters'. You can use it in Python, and we have provided tutorials and samples in Python, with for exemple...
15
by: Michael A. Covington | last post by:
Any thoughts about how to implement image processing algorithms to run fast in C#? Using GetPixel to access every pixel from a Bitmap seems to be rather time-consuming.
3
by: birensubudhi | last post by:
hey guys,can anyone tell me what is image processing, how to do it using C. IN KSHITIJ 2007 held at IIT kgp a que by INFOSYS is asked, they hav given an image then cut in different orientation...
5
by: whisk3rs | last post by:
Hello, I have a conceptual question. I need to write a program that will take as input a list of images and then process each image individually (extract useful features from the image) ...
0
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.