Преглед на файлове

Correcciones gramaticales, hasta para los codigos fuentes

SaraB преди 7 години
родител
ревизия
dde43f8101
променени са 4 файла, в които са добавени 12 реда и са изтрити 13 реда
  1. 6
    6
      MergePanel.cpp
  2. 1
    1
      MergePanel.h
  3. 3
    4
      README-en.md
  4. 2
    2
      README-es.md

+ 6
- 6
MergePanel.cpp Целия файл

@@ -21,7 +21,7 @@ MainWindow::MainWindow(QWidget *parent) :
21 21
     // Closes window with cmd + w
22 22
     // Cierra la ventana con cmd + w
23 23
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this, SLOT(close()));
24
-    // Opens a image with cmd + o
24
+    // Opens an image with cmd + o
25 25
     // Abre una imagen con cmd + o
26 26
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_O), this, SLOT(on_btnSelectImage_clicked()));
27 27
     // Opens background image with cmd + n
@@ -31,7 +31,7 @@ MainWindow::MainWindow(QWidget *parent) :
31 31
     // Guarda una imagen con cmd + s
32 32
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_S), this, SLOT(on_btnSaveImage_clicked()));
33 33
     // Merges two images with cmd + m
34
-    // Fuciona dos imagenes con cmd + m
34
+    // Fusiona dos imagenes con cmd + m
35 35
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_M), this, SLOT(on_btnMergeImages_clicked()));
36 36
     // Makes the label clickable.
37 37
     // Hace el labelWidget cliqueable.
@@ -91,7 +91,7 @@ void MainWindow::on_btnSelectBackground_clicked(){
91 91
 /// \brief  Invokes the function that merges the green screen image with the background image,
92 92
 /// then displays the merged image.
93 93
 /// \~Spanish
94
-/// \brief Invoca la funcion que fusional la imagen con transfondo verde con la imagen de transfondo,
94
+/// \brief Invoca la funcion que fusiona la imagen con transfondo verde con la imagen de transfondo,
95 95
 /// entonces displiega la imagen fusionada.
96 96
 void MainWindow::on_btnMergeImages_clicked(){
97 97
     if (originalImage.width() > backgroundImage.width() || originalImage.height() > backgroundImage.height()){
@@ -108,8 +108,8 @@ void MainWindow::on_btnMergeImages_clicked(){
108 108
 /// \brief Displays the file browse window to choose the path to save
109 109
 /// the merged image in the file system.
110 110
 /// \~Spanish
111
-/// \brief Despliega la ventana de busqueda de archivos para escoger un camino
112
-/// guardar la imagen fusionada en el sistema de archivos.
111
+/// \brief Despliega la ventana de búsqueda de archivos para escoger un camino
112
+/// para guardar la imagen fusionada en el sistema de archivos.
113 113
 void MainWindow::on_btnSaveImage_clicked(){
114 114
     if(!mergedImage.isNull()){
115 115
         QPixmap out = QPixmap::grabWidget(this,361,10,481,481);
@@ -141,7 +141,7 @@ void MainWindow::Mouse_Pressed(){
141 141
 /// \~English
142 142
 /// \brief Function that gets the coordinaates of the image with the final background.
143 143
 /// \~Spanish
144
-/// \brief Funcion que obtiene las coordenada de la imagen con el trasfondo final.
144
+/// \brief Funcion que obtiene las coordenadas de la imagen con el trasfondo final.
145 145
 void MainWindow::Mouse_PressedBackground(){
146 146
     if (!backgroundImage.isNull()){
147 147
         if (backgroundImage.height() < ui->lblBackgroundImage->height())

+ 1
- 1
MergePanel.h Целия файл

@@ -38,7 +38,7 @@ public:
38 38
     /// \brief Funcion that merges two images together. It takes an image with any background color
39 39
     /// and puts it in another image that will act as a background. (Implements Greenscreen techonology)
40 40
     /// \~Spanish
41
-    /// \brief Funcion que fusiona dos imagenes juntas.  Toma una image con cualquier color de trasfondo
41
+    /// \brief Funcion que fusiona dos imagenes juntas. Toma una imagen con cualquier color de trasfondo
42 42
     /// y lo pone en otra imagen que actual como el  trasfondo. (Implementa la tecnologia de trasfondo verde)
43 43
     void MergeImages(const QImage &, const QImage &, QImage &, int, bool=false, int=0, int=0, int=0, int=0) ;
44 44
 

+ 3
- 4
README-en.md Целия файл

@@ -5,7 +5,6 @@
5 5
 ![main2.png](images/main2.png)
6 6
 ![main3.png](images/main3.png)
7 7
 
8
-[Verano 2016 - Ive- Tatiana]
9 8
 
10 9
 Arrays help us to store and work with groups of data of the same type. The data is stored in consecutive memory spaces which can be accessed by using the name of the array and indexes or subscripts that indicate the position where the data is stored. Repetition structures provide us a simple way of accessing the data within an array. In this laboratory experience, you will be using nested loops to process bi-dimensional arrays and implement the functionality of a green-screen.
11 10
 
@@ -55,7 +54,7 @@ Figure 1: Example of the expected results. The object of interest is the hand ca
55 54
 
56 55
 For illustration purposes, let's call the image with the solid background *image A* and let's say that the solid color in the background has an RGB `0x00ff00` (pure green). We will refer to the image with the interesting background as *image B*. Let's also assume that both images are the same size (width and height). 
57 56
 
58
-To produce the merged image (*image C*), we could start by completely copying *image B* to *image *C*. Then, to insert only the object of interest into the merged image we could traverse *image A* pixel by pixel. We would compare the color of each pixel *p* in *image A* to the color `0x00FF00`, if they are *similar* we do nothing (because it means that this pixel is part of the solid color background). If the color of *p* is not *similar* to `0x00FF00`, we modify the corresponding pixel in *image C*, copying the color of the object's pixel to the merged image.
57
+To produce the merged image (*image C*), we could start by completely copying *image B* to *image C*. Then, to insert only the object of interest into the merged image we could traverse *image A* pixel by pixel. We would compare the color of each pixel *p* in *image A* to the color `0x00FF00`, if they are *similar* we do nothing (because it means that this pixel is part of the solid color background). If the color of *p* is not *similar* to `0x00FF00`, we modify the corresponding pixel in *image C*, copying the color of the object's pixel to the merged image.
59 58
 
60 59
 ---
61 60
 
@@ -268,7 +267,7 @@ where $$N_R$$, $$N_G$$, and $$N_B$$ are the red, green and blue components of th
268 267
 
269 268
 ### Exercise 3 - Create a Composite Image placing the Object in a Specified Position
270 269
 
271
-The widget that displays the background has been programmed to register the position where the user clicks. In this exercise you will program the `MergeImages` function so that the position that user clicks in the background image is used as the *top left* corner where the *object* image will be displayed in the merged image. The figures 7 and 8 illustrate the effect. Note the *Selected Coord* values under the images.
270
+The widget that displays the background has been programmed to register the position where the user clicks. In this exercise you will program the `MergeImages` function so that the position where the user clicks on the background image is used as the *top left* corner where the *object* image will be displayed in the merged image. The figures 7 and 8 illustrate the effect. Note the *Selected Coord* values under the images.
272 271
 
273 272
 
274 273
 ---
@@ -329,7 +328,7 @@ Use "Deliverable" in Moodle to upload the `filter.cpp` file that contains the `M
329 328
 
330 329
 ### References
331 330
 
332
-[1] http://en.wikipedia.org/wiki/Green_screen_(disambiguation
331
+[1] http://en.wikipedia.org/wiki/Green_screen_(disambiguation)
333 332
 
334 333
 [2] http://en.wikipedia.org/wiki/Chroma_key
335 334
 

+ 2
- 2
README-es.md Целия файл

@@ -44,7 +44,7 @@ Antes de llegar al laboratorio debes haber:
44 44
 
45 45
 En esta experiencia de laboratorio, aprenderás los conceptos y destrezas básicas de la tecnología de pantalla verde que se usa en boletines informativos de televisión, películas, videojuegos y otros. La composición de pantalla verde, o composición cromática, es una técnica que se usa para combinar dos imágenes o cuadros de video [1]. Esta técnica de post-producción crea efectos especiales al componer dos imágenes o transmisiones de video sustituyendo el área de un color sólido por otra imágen [2]. La composición cromática se puede hacer con imágenes de objetos sobre fondos de cualquier color que sean uniformes y diferentes a los de la imagen. Los fondos azules y verdes son los que se usan con más frecuencia porque se distinguen con más facilidad de los tonos de la mayoría de los colores de piel humanos.
46 46
 
47
-Para esta experiencia de laboratorio te proveemos un interfaz gráfico (GUI) simple que permite al usuario cargar una imagen con un objeto sobre un fondo de color sólido (preferiblemente azul o verde) y una imagen para sustituir el fondo. Tu tarea es crear e implementar una función que cree una tercera imagen compuesta en la cua,l la imagen del objeto con el fondo de color sólido se le removerá el color de fondo y el objeto aparecerá sobre la imagen que será el nuevo fondo. La Figura 1 muestra un ejemplo de los resultados esperados.
47
+Para esta experiencia de laboratorio te proveemos un interfaz gráfico (GUI) simple que permite al usuario cargar una imagen con un objeto sobre un fondo de color sólido (preferiblemente azul o verde) y una imagen para sustituir el fondo. Tu tarea es crear e implementar una función que cree una tercera imagen compuesta en la cual la imagen del objeto con el fondo de color sólido se le removerá el color de fondo y el objeto aparecerá sobre la imagen que será el nuevo fondo. La Figura 1 muestra un ejemplo de los resultados esperados.
48 48
 
49 49
 ---
50 50
 
@@ -239,7 +239,7 @@ Para este ejercicio puedes ignorar el filtro "fantasma" `ghost` y las coordenada
239 239
 
240 240
 1. Adquiere el valor del color sólido. El color sólido será el color del píxel en la posición `(x,y)` en la imagen del objeto sobre fondo sólido. El valor por defecto para `(x,y)` es `(0,0)`.
241 241
 
242
-2. Para todas las posiciones `(i,j)`, adquiere  el valor del color del píxel en la posición `(i,j)` de la imagen con el objeto. Computa la distancia entre el color de la imagen con el objeto y el valor del color sólido. Si la distancia entre el color sólido y el color del píxel de la imagen es mayor que que el valor umbral, cambia el valor del color del píxel en la posición `(i,j)` de la imagen de fondo al valor del color de la imagen con el objeto.
242
+2. Para todas las posiciones `(i,j)`, adquiere  el valor del color del píxel en la posición `(i,j)` de la imagen con el objeto. Computa la distancia entre el color de la imagen con el objeto y el valor del color sólido. Si la distancia entre el color sólido y el color del píxel de la imagen es mayor que el valor umbral, cambia el valor del color del píxel en la posición `(i,j)` de la imagen de fondo al valor del color de la imagen con el objeto.
243 243
  
244 244
 Prueba tu implantación cargando imágenes de objetos e imágenes para el fondo y verificando la imagen compuesta.
245 245