Professional Documents
Culture Documents
The Raspberry Pi Model B have the following connectors: Figure 3. Python logo
Figure 2. RaspberryPi tech specifications The most common filters are those that separate two signals,
either two audios or that eliminate noise from a signal, such
as the background of an image, the background sound of an translating the algorithm from Matlab to Python language,
audio, the transparency of an image, etc. using the open CV library available for Python.
There are several types of digital filters as well as different a) Matlab algorithms
classifications of these:
For the first algorithm, we wanted to detected the edges with a
According to the part of the spectrum on which they act: Laplacian kernel, then find the coordinates of the edges a
• High pass filters. person or object in the image Fig. 4, meanwhile use the anissof
• Low pass filters. function (we changed the parameter for niter) to blur the
• Band pass filters. background and the last step was to cut the person/object from
• Band removed. the first imagen and mount it on the image with the background
• Multiband. blurred. This algorithm work fine when we work with a single
• Everything happens. image, however things get complicated working with real time
video, that’s why we needed to thing in a new way of doing the
• Resonator.
blurring.
• Oscillator.
• Comb filter.
• Notch filter or notch filter.
• According to your order:
o first order
o second order
• According to your response to unit input:
• FIR (Finite Impulse Response)
• IIR (Infinite Impulse Response)
• TIIR (Truncated Infinite Impulse Response)
• According to the structure with which it is
implemented:
o Laticce
Figure 4. Left, original image. On the right the original image with the
o Several in cascade laplacian kernel aplied
o Several in parallel Open cv
In the second experiment we made a question. What is and
OpenCV-Python is a library of Python bindings designed to image in Matlab? It is a matrix, so if what if we took two
solve computer vision problems. OpenCV-Python makes use pictures A and B with the same background but B has a person
of Numpy, which is a highly optimized library for numerical in it. Is there any way we can make a mathematical operation
operations with a MATLAB-style syntax. All the OpenCV between A and B to get the person from image B modify image
array structures are converted to and from Numpy arrays. This A and the add both results, well this is what we did for the
also makes it easier to integrate with other libraries that use second algorithm and the experiment in Matlab.
Numpy such as SciPy and Matplotlib.
The first part we toke and reference image called A.
IV. MATERIALS
Raspberry Pi
USB webcam
Laptop
Monitor
V. SOFTWARE
Python
Open CV for Python
Matlab
VI. METODOLOGY
The making of the blurring program is divided in two phases. Figure 5. Refernce image (background)
The first one is making experiments in Matlab to get an
algorithm to blur the background of a video. The second is Now we take the image but with a new object/person in it we
called the image B.
Figure 6. The book simulates the person.
b) Python
In python the only challenge was translate the Matlab code, but
the first dificulty was the time for doing the operation; a
solution was to use the Open CV library with hel us to
overcome and finally run the code from python in the
Raspberry. The code is shown in Fig.9
Figure 12. In Fig 12 we can see the problem with this algoritm
VIII. CONCLUSION
Mosqueda Camacho Alan: In this project we implemented
everything we learnt during the semester. And designed an
algorithm that blurrs the background. We manipulated the
images of the video as matrices and implements basic matrix
operations. The most difficult part was to figure out the right
method to blur the background. We tried using convolution lack of a camera but despite that I made the code that was used
with a Laplacian Kernel, but It takes a lot of time. In the end in matlab so I took the first steps to develop the python
we used an easier algorithm. program, from then on in the background by distorting the
positioning it generates problems that we decided to solve by
Sosa Cabrera Diego: In this project we write a code with all the leaving the background static.
knowledge we acquired during the course. We needed to think
how to attack the problem from different perspectives, this can IX. REFERENCES
be seen in how we change all the idea because another way it
[1] Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa, “Electron spectroscopy
would’ve been really difficult to work. Using open cv really studies on magneto-optical media and plastic substrate interface,” IEEE
help us to improve the python code and make work more Transl. J. Magn. Japan, vol. 2, pp. 740–741, August 1987 [Digests 9th
efficiently than matlab code, however there are some errors Annual Conf. Magnetics Japan, p. 301, 1982].
that can be fixed in futures versions.
[2] V.K Ingle & J.G. Proakis (1996) “Digital signal Processing” V. 4
[Online]. [Accessed: 30-Ago-2020].
Villoria Quiñones Pablo Alberto: In this final semester project,
points that were seen throughout the course were taken into
[3] “The official Raspberry Pi beginner's guide” [Online]. [Accessed: 17-
account, so I consider it a good project that helps us understand Ago-2020].
signal processing, from what we learned in the course I can
mention that what I have seen In the matter of signals it is now
[4] Docs.opencv.org. 2020. Opencv: Smoothing Images. [online] Available
clearer and more applicable so the knowledge that I take with at: <https://docs.opencv.org/master/d4/d13/tutorial_py_filtering.html>
me is valuable, as for the project, the difficulty I had was the [Accessed 15 September 2020].