Browse Source

Correcciones gramaticales, hasta para los codigos fuentes

SaraB 7 years ago
parent
commit
dde43f8101
4 changed files with 12 additions and 13 deletions
  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 View File

21
     // Closes window with cmd + w
21
     // Closes window with cmd + w
22
     // Cierra la ventana con cmd + w
22
     // Cierra la ventana con cmd + w
23
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this, SLOT(close()));
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
     // Abre una imagen con cmd + o
25
     // Abre una imagen con cmd + o
26
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_O), this, SLOT(on_btnSelectImage_clicked()));
26
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_O), this, SLOT(on_btnSelectImage_clicked()));
27
     // Opens background image with cmd + n
27
     // Opens background image with cmd + n
31
     // Guarda una imagen con cmd + s
31
     // Guarda una imagen con cmd + s
32
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_S), this, SLOT(on_btnSaveImage_clicked()));
32
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_S), this, SLOT(on_btnSaveImage_clicked()));
33
     // Merges two images with cmd + m
33
     // Merges two images with cmd + m
34
-    // Fuciona dos imagenes con cmd + m
34
+    // Fusiona dos imagenes con cmd + m
35
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_M), this, SLOT(on_btnMergeImages_clicked()));
35
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_M), this, SLOT(on_btnMergeImages_clicked()));
36
     // Makes the label clickable.
36
     // Makes the label clickable.
37
     // Hace el labelWidget cliqueable.
37
     // Hace el labelWidget cliqueable.
91
 /// \brief  Invokes the function that merges the green screen image with the background image,
91
 /// \brief  Invokes the function that merges the green screen image with the background image,
92
 /// then displays the merged image.
92
 /// then displays the merged image.
93
 /// \~Spanish
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
 /// entonces displiega la imagen fusionada.
95
 /// entonces displiega la imagen fusionada.
96
 void MainWindow::on_btnMergeImages_clicked(){
96
 void MainWindow::on_btnMergeImages_clicked(){
97
     if (originalImage.width() > backgroundImage.width() || originalImage.height() > backgroundImage.height()){
97
     if (originalImage.width() > backgroundImage.width() || originalImage.height() > backgroundImage.height()){
108
 /// \brief Displays the file browse window to choose the path to save
108
 /// \brief Displays the file browse window to choose the path to save
109
 /// the merged image in the file system.
109
 /// the merged image in the file system.
110
 /// \~Spanish
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
 void MainWindow::on_btnSaveImage_clicked(){
113
 void MainWindow::on_btnSaveImage_clicked(){
114
     if(!mergedImage.isNull()){
114
     if(!mergedImage.isNull()){
115
         QPixmap out = QPixmap::grabWidget(this,361,10,481,481);
115
         QPixmap out = QPixmap::grabWidget(this,361,10,481,481);
141
 /// \~English
141
 /// \~English
142
 /// \brief Function that gets the coordinaates of the image with the final background.
142
 /// \brief Function that gets the coordinaates of the image with the final background.
143
 /// \~Spanish
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
 void MainWindow::Mouse_PressedBackground(){
145
 void MainWindow::Mouse_PressedBackground(){
146
     if (!backgroundImage.isNull()){
146
     if (!backgroundImage.isNull()){
147
         if (backgroundImage.height() < ui->lblBackgroundImage->height())
147
         if (backgroundImage.height() < ui->lblBackgroundImage->height())

+ 1
- 1
MergePanel.h View File

38
     /// \brief Funcion that merges two images together. It takes an image with any background color
38
     /// \brief Funcion that merges two images together. It takes an image with any background color
39
     /// and puts it in another image that will act as a background. (Implements Greenscreen techonology)
39
     /// and puts it in another image that will act as a background. (Implements Greenscreen techonology)
40
     /// \~Spanish
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
     /// y lo pone en otra imagen que actual como el  trasfondo. (Implementa la tecnologia de trasfondo verde)
42
     /// y lo pone en otra imagen que actual como el  trasfondo. (Implementa la tecnologia de trasfondo verde)
43
     void MergeImages(const QImage &, const QImage &, QImage &, int, bool=false, int=0, int=0, int=0, int=0) ;
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 View File

5
 ![main2.png](images/main2.png)
5
 ![main2.png](images/main2.png)
6
 ![main3.png](images/main3.png)
6
 ![main3.png](images/main3.png)
7
 
7
 
8
-[Verano 2016 - Ive- Tatiana]
9
 
8
 
10
 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.
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
 
54
 
56
 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). 
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
 
267
 
269
 ### Exercise 3 - Create a Composite Image placing the Object in a Specified Position
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
 
328
 
330
 ### References
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
 [2] http://en.wikipedia.org/wiki/Chroma_key
333
 [2] http://en.wikipedia.org/wiki/Chroma_key
335
 
334
 

+ 2
- 2
README-es.md View File

44
 
44
 
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.
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
 
239
 
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)`.
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
 Prueba tu implantación cargando imágenes de objetos e imágenes para el fondo y verificando la imagen compuesta.
244
 Prueba tu implantación cargando imágenes de objetos e imágenes para el fondo y verificando la imagen compuesta.
245
 
245