I'm using the convolve2d(imag e, mask) function from scipy to blur an
image. The image I'm using is 512 by 384. When I display the image that
convolve2d returns, the the left-most square of pixels (388 by 388)
turn out fine, blurred and everything, however the right side of the
image is all black.
I've uploaded the practice image to: http://tinypic.com/1g3iox
The output image is: http://tinypic.com/1g3iv9
here's what I entered at the intereactive window: import scipy img = scipy.imread("c :\\practice.jpg ",flatten=T rue) img.shape
(384, 512) mask =
(1.0/115)*scipy.arra y([[2,4,5,4,2],[4,9,12,9,4],[5,12,15,12,5],[4,9,12,9,4],[2,4,5,4,2]]) blurredImg = scipy.signal.co nvolve2d(img, mask) scipy.imsave("c :\\blurred.jpg" ,blurredImg)
Also, I noticed that the shape attribute is (384, 512), even though
windows and my image editor say the image is 512 by 384. Could this
have something to do with the reason convolve2d() only works right on
the left-most 388 by 388 pixels? Thanks for any help.
-Mike Kreiner 0 1509 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: LabWINC |
last post by:
Hi all,
i would like to design a high pass filter with scipy.signal module.
This is the code i'm using to:
import scipy.signal as signal
import scipy
#first of all i design the lowpass fir filter. This is a 10 taps filter
with cutoff frequency =1 (as help tell me to do)
|
by: HYRY |
last post by:
Why the exec time of test(readdata()) and test(randomdata()) of
following program is different?
my test file 150Hz10dB.wav has 2586024 samples, so I set randomdata
function
to return a list with 2586024 samples.
the exec result is:
2586024
<type 'list'>
10.8603842736
2586024
|
by: dug |
last post by:
Hi,
I would like to do some real time signal processing with a graphical
display and I would like your advice as to what I should use. I would
like to be able to view the results and to change parameters of some
signal processing in 'real time'. Data is coming quite slowly in every
1-5 seconds and will consist of (x,y,t).
I have been thinking about SciPy or matplot, but am not restricting
|
by: gaddam bala |
last post by:
Hi all,
I was trying to install (Scientific Python) scipy 0.3.2 in LINUX 3, but I am facing some problem.Please help me in resolving this issue.
here are the steps that i have followed :
Installed pre-requisites for scipy installations:
1. Python-2.4.1
$./configure
$make
$make install
2. ATLAS
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |