sábado, 29 de abril de 2017

Tres Algoritmos para convertir una imagen de color a escala de grises

Tres Algoritmos para convertir una imagen de color a escala de grises
lightness: 
(max(R, G, B) + min(R, G, B)) / 2
average:
(R + G + B) / 3
luminosity:
 0.21 R + 0.72 G + 0.07 B

Three algorithms for converting color to grayscale

How do you convert a color image to grayscale? If each color pixel is described by a triple (R, G, B) of intensities for red, green, and blue, how do you map that to a single number giving a grayscale value? The GIMP image software has three algorithms.
The lightness method averages the most prominent and least prominent colors: (max(R, G, B) + min(R, G, B)) / 2.
The average method simply averages the values: (R + G + B) / 3.
The luminosity method is a more sophisticated version of the average method. It also averages the values, but it forms a weighted average to account for human perception. We’re more sensitive to green than other colors, so green is weighted most heavily. The formula for luminosity is 0.21 R + 0.72 G + 0.07 B.
The example sunflower images below come from the GIMP documentation.
Original imagecolor photo of sunflower
Lightnesssunflower converted to grayscale using lightness algorithm
Averagesunflower converted to grayscale using average algorithm
Luminositysunflower converted to grayscale using luminosity algorithm
The lightness method tends to reduce contrast. The luminosity method works best overall and is the default method used if you ask GIMP to change an image from RGB to grayscale from the Image -> Mode menu. However, some images look better using one of the other algorithms. And sometimes the three methods produce very similar results.

Convertir una imagen a escala de grises matlab u octave


Convertir una imagen a escala de grises  matlab u octave
http://matlab-typ.blogspot.com.co/2016/08/convertir-una-imagen-escala-de-grises.html

Convertir una imagen a escala de grises


La manera rápida

Si cuenta con el Image Processing Toolbox MATLAB dispone de una función llamada rgb2gray que permite convertir una imagen RGB a una en escala de grises, ej:

X = imread('lenna.png');
XG = rgb2gray(X);
imshow(XG);

Imagen original

Imagen en escala de grises
Como puede notar es muy simple, sólo necesita pasar como argumento la matriz que contiene la información de la imagen RGB.

La otra, un poco de algoritmos...

Si no dispone del toolbox de procesamiento de imagen, entonces puede implementar su propio algoritmo para realizar dicha tarea.
El algoritmo más simple es el del promedio (average method), que consiste en calcular el promedio de los canales RGB y asignarlos al pixel correspondiente en la imagen de grises. Por ejemplo dada una matriz de MxNx3 correspondiente a una imagen, el pixel de la matriz de grises en la posición (i, j) se calcula como sigue:

XGi,j=Xi,j,1+Xi,j,2+Xi,j,33


Donde XG es la matriz de grises, de dimensiones MxN. Y Xi, j, 1Xi, j, 2 y Xi, j, 3 las componentes correspondientes a los canales R, G y B, respectivamente.

Implementando esto en MATLAB:

X = imread('lenna.png');
XG = uint8(mean(X,3));
imshow(XG);

¿Bastante simple verdad?, lo que hacemos es hacer el promedio en la dimensión 3, es decir, para cada pixel. La conversión a entero de 8-bits (uint8) es necesaria para que se muestre correctamente cuando utilizamos imshow, dado que la función mean devuelve una matriz de tipo double.
Otro método para convertir a escala de grises es el de la luminosidad (luminosity method) que consiste en asignar una proporción específica (ponderada) a cada uno de los canales, dependiendo la aportación de estos. De hecho MATLAB utiliza este tipo de transformación en la función rgb2gray. Con este método, la expresión para calcular el valor de un pixel de grises viene dado por:

XGi, j = 0.2889 Xi, j, 1 + 0.5870 Xi, j, 2 + 0.1140 Xi, j, 3

LLevando esto a un código MATLAB:

X = imread('img/lenna.png');
k = [0.2989 0.5870 0.1140];
XG = X(:,:,1)*k(1) + X(:,:,2)*k(2) + X(:,:,3)*k(3);
imshow(XG)

Procesamiento de Imagenes Online

Procesamiento de Imagenes Online
http://pinetools.com/es/c-imagenes/

Imágenes

Redimensionar imágenes, recortar imágenes, rotar imágenes, desaturar imágenes, cambiar saturación, brillo, cambiar histograma

Invertir colores

Invertir colores de una imagen

Voltear imagen

Voltea una imagen horizontalmente y/o verticalmente

Oscurecer imagen

Oscurece una imagen

Aclarar imagen

Iluminar una imagen

Cambiar brillo

Ajusta el brillo de una imagen

Cambiar contraste

Ajusta el contraste de una imagen

Imagen en escala de grises

Desatura completamente una imagen

Cambiar saturación

Ajusta la saturación de una imagen

Cambiar intensidad

Ajusta la intensidad de una imagen

Cambiar exposición

Ajusta la exposición de una imagen

Ajustar gamma

Aplicar ajuste gamma a una imagen

Efecto sepia

Efecto sepia a fotos

Rango de color

Disminuye la cantidad de colores

Agregar ruido

Añade ruido a una imagen

Ajustar matiz

Ajusta el matiz de una imagen

Afilar bordes

Afilar una imagen

Filtros especiales

Aplica filtros especiales

Ajustar canales

Modifica la intensidad de los canales de colores

Efecto viñeta

Aplica el efecto viñeta

Colorizar imagen

Coloriza una imagen utilizando el color seleccionado

Combinar imágenes

Combina dos imágenes

Recortar imagen

Recorta una imagen

Redimensionar imagen

Modificar el tamaño de una imagen

Selector de color de imagen

Elige un color de una imagen

Obtener colores de imagen

Extrae la paleta de colores de una imagen

Desenfocar imagen

Desenfocar una imagen con diferentes filtros

Efecto miniatura (tilt-shift)

Aplica efecto de imagen en miniatura

Efecto relieve

Generador de efecto relieve

Efecto relieve a color

Generador de efecto relieve a color

Convertir a blanco y negro

Convierte imágenes a blanco y negro

Efecto posterizar

Efecto posterizar imagen

Efecto solarización

Efecto solarizar imagen

Detección de bordes

Detecta los bordes en una imagen

Realce de bordes

Intensifica los bordes de una imagen

Redondear esquinas de imagen

Recorta las esquinas de una imagen

Rotar imagen

Girar una imagen

Efecto pixelado

Pixelar una imagen

Eliminar ruido

Reduce el rudo de una imagen

Brillo y contraste

Cambia el brillo y el contraste

Efecto resplandecer

Efecto incandescente a una imagen

Ecualizar imagen

Incrementa el contraste global

Ajustar HSL

Ajusta los valores de HSL de una imagen

Canales RGB

Obtener los canales de colores RGB

Histograma de imagen

Genera histograma de imagen

Censurar imagen (desenfocar, pixelar)

Desenfocar, pixelar o censurar parte de una imagen

Superponer imágenes

Fusiona dos imágenes (una encima de la otra)

Generador de mapa de bits aleatorios

Genera una imagen aleatoria

Efecto duotono (Spotify)

Aplica efecto duotono a una foto

Partir imágenes

Separar una imagen en imágenes mas pequeñas

Tutorial de Octave 2017, clon de matlab

A high-level interactive language for numerical computations
Edition 4 for Octave version 4.2.1
February 2017

Octave System Information Commands

Octave System Information Commands

computer ()
   -| i586-pc-linux-gnu

mycomp = computer ()
   ⇒ mycomp = "i586-pc-linux-gnu"
 
uname ()
   ⇒ {
         sysname = x86_64
         nodename = segfault
         release = 2.6.15-1-amd64-k8-smp
         version = Linux
         machine = #2 SMP Thu Feb 23 04:57:49 UTC 2006
      } 
 
 
 
: computer ()
: c = computer ()
: [c, maxsize] = computer ()
: [c, maxsize, endian] = computer ()
: arch = computer ("arch")


: [uts, err, msg] = uname ()

: nproc ()
: nproc (query)

: ispc ()

: isunix ()

: ismac ()

: isieee ()

: isdeployed ()

: isstudent ()

: OCTAVE_HOME ()

: matlabroot ()

: OCTAVE_VERSION ()

: v = version ()
: [v, d] = version ()
: v = version (feature)
 
: ver
: ver Octave
: ver package
: v = ver (…)
: compare_versions (v1, v2, operator)
: license
: license inuse
: license inuse feature
: license ("inuse")
: retval = license ("inuse")
: retval = license ("test", feature)
: retval = license ("checkout", feature)
: [retval, errmsg] = license ("checkout", feature)
 
: getrusage ()
 https://www.gnu.org/software/octave/doc/interpreter/System-Information.html#XREFver
 

        

 

miércoles, 26 de abril de 2017

Doctorado Universidad Digital del Estado de México/ Universidad Abierta

Doctorado Universidad Digital del Estado de México/ Universidad Abierta
 http://udemex.edomex.gob.mx/doctorado_ua#tabla15
 

ffmpeg cut video mp4 - Recortar un video con ffmpeg

Para recortar un video con el comando ffmpeg:
paso 1: Abrir una ventana de comandos cmd (ya se instalo previamente ffmeg)

paso2: Ubicarse en la carpeta donde tiene el video

Paso 3: Aplicar el comando de ffmpeg
ffmpeg -ss 00:00:00 -i Tuto_Imagen_Mono.mp4 -t 00:02:10 -c copy Tuto210.mp4

Referencia:

https://trac.ffmpeg.org/wiki/Seeking

viernes, 21 de abril de 2017

Conversor Punto Flotante IEEE-754


Conversión Punto Flotante IEEE-754
De Punto Flotante a su representación en 32-bit y 64-bit Hexadecimal y sus binarios equivalentes.
Ingresar un número Real aquí, luego haga click en "Con Redondeo" o en "Sin Redondear" para ver el resultado de la conversión.
http://www-2.dc.uba.ar/materias/oc1/2005/documentos/docu_float_conver.html

miércoles, 19 de abril de 2017

Falstad Simulation RC Circuit Math

Circuito RC
http://www.intmath.com/differential-equations/6-rc-circuits.php



http://www.falstad.com/circuit/e-index.html



  • Basics


  • A/C Circuits
  • Passive Filters
  • Other Passive Circuits
  • Diodes
  • Op-Amps
  • MOSFETs
  • Transistors (Bipolar)
  • Combinational Logic
  • Sequential Logic
  • 555 Timer Chip
  • Transmission Lines
  • Memristors
  • Tunnel Diodes
  • Spark Gaps
  • Diseño de filtros analógicos

    Diseño de filtros analógicos


    https://cv3.sim.ucm.es/access/content/group/portal-uatducma-43/webs/material_original/apuntes/PDF/09_filtros_analogicos.pdf


    https://sites.google.com/a/goumh.umh.es/circuitos-electronicos-analogicos/transparencias/tema-2


    Factorización LU, Inversa y Eliminación Gausiana Paso a Paso

    Factorización LU, Inversa y Eliminación Gausiana Paso a Paso

    http://www.gregthatcher.com/mathematics/gaussjordan.aspx

    jueves, 6 de abril de 2017

    Grabar de Pantalla del PC con Audio - Tutorial Configuración Screen2EXE (Screen2SWF) y Virtual Cable

    Grabar de Pantalla del PC con Audio - Tutorial Configuración Screen2EXE (Screen2SWF) y Virtual Cable

    https://youtu.be/mDWKiSUgaEU

    Tutorial Comparador en Logisim de 4 bits con sumadores

    Tutorial Comparador en Logisim de 4 bits con sumadores

    JulioAdder.circ
    logisim-win-2.7.1.exe
    Tutorial Comparador.docx

    Los archivos se encuentran en:

    https://drive.google.com/open?id=0B4MU_vXK_smlQmh1UFprTlVhcUE


    Descargar logisim
    https://sourceforge.net/projects/circuit/?source=typ_redirect
    Abrir el archivo JulioAdder.circ
    Si quieres ejemplos de logisim:
    https://www.electronics-micros.com/software-hardware/logisim-example-circuits/

    Libros de Ciencia del Futuro - Michio Kaku - Будущие научные книги - Митио Каку

    Libros de Ciencia del Futuro - Michio Kaku

    El futuro de nuestra mente - Michio Kaku
    Fisica de lo imposible - Michio Kaku
    Future Physics - Michio Kaku
    La física del futuro - Michio Kaku
    Resumen Articulo libro La física del futuro
    Universos paralelos - Michio Kaku


    https://drive.google.com/drive/folders/0B4MU_vXK_smlVHpVUFBYMlNMMWc

    Будущие научные книги - Митио Каку


    Будущее нашего ума - Митио Каку

    Физика невозможного - Митио Каку

    Будущая физика - Митио Каку

    Физика будущего - Митио Каку

    Статья Основная книга Физика будущего

    параллельные вселенные - Митио Каку

    martes, 4 de abril de 2017

    Usar google Drive para public_html o crear paginas web y guardarlas en el drive

    Usar google Drive para public_html o crear paginas web y guardarlas en el drive
    http://www.curbyalexander.net/2014/11/using-google-drive-as-a-file-server/

    https://www-drv.com/index.html

    Using Google Drive as a file server

    Update: The Google Drive API previously mentioned in this post has been discontinued. This service continues to work using the www-drv.com service. There are some important changes to this service that resulted in significant changes to this post. In some ways, the process is much simpler, but other aspects of the process are significantly more complex.
    Have you ever been in a situation where you need to host several files on the Web? Did you need for those files to have a dedicated URL? Personally, I have had few situations where this was the case, but today I encountered a learning activity that required students to quickly upload images they just captured so they could add them to a Google Map. After some searching around, I found that the Google Drive hosting API is perfect for this sort of thing. Here is what I did …

    Create Drive Folders

    The first thing I had to do was create a set of Google Drive folders for students to put the images they just captured. For this activity, students were running around our university taking pictures of some of the landmarks. They were then going to use these images to create an interactive map of the campus with the My Places tool in Google Maps. I created several folders in a Google account I use only for this class. My TA’s and I connected a class set of iPads to this account so the students could load their images directly into Drive, which is what they did as soon as they got back to the classroom.
    An important step in this process is to set the permissions for the folders to Public. You can do this directly through Drive. You will find the folder, right-click and choose Get Link.

    Screen Shot 2014-11-11 at 10.56.52 PM

    You will then need to change the permissions. Google has a great explanation for how to do that right here.

    Set Up the Hosted Site

    This part is actually much easier than you might think. You will need to go to WWW Drive (https://www-drv.com/index.html), and give permission to this service to access your Drive files. This also works with OneDrive files, but I am not a user of this service.
    Once you have given permission to WWW Drive, it will scan your contents looking for public HTML files. If you are not familiar with how to create an HTML file, there are many resources and templates that will help you get started. This is something I will cover in a future post, but in the short term you can save a Google Doc or Word file in HTML format. You will then need to upload that to the folder you have designated for this project. If you are feeling adventurous, you can use Editey to create your web files for you. This service saves your files in your Google Drive automatically (if you sign in with your Google Drive credentials).
    The WWW Drive admin screen looks like this:
    screen-shot-2016-11-30-at-11-04-46-am
    Here is an example of a simple HTML file hosted on my Google Drive.
    Note: This service will only point to public HTML files. If you want to provide students with a link to other files, images, or folders, you will need to include those in the HTML file. This is quite different than hosting files on a server, where the browser will build an index file with links to each resource in the folder if you do not have a designated index file.
    So, that’s it. In just a few clicks, I can create a public-HTML directory, host an index file in that directory, and put links to any resource you want. This service is particularly good for creating web pages with resources and scripts not possible in a Google Doc (e.g., video, javaScript, CSS, animations, etc.).  I don’t think I will need this functionality all that often, but it sure will be handy when I do.

    Link para Como crear una cuenta en rusia con espacio casi ilimitado con cloud email y muchos servicios

    Link para Como crear una cuenta en rusia con espacio casi ilimitado con cloud email y muchos servicios
    Mail.Ru provides you with free email, a quick and convenient interface, unlimited space, trusted antispam and antivirus along with mobile versions and ....

    https://e.mail.ru/cgi-bin/signup

    Ссылка для создания учетной записи в России практически неограниченным пространство с облачной электронной почтой и многими услугами



    Traducción del ruso al español del clik derecho del drive en cloud.mail.ru

    Traducción del ruso al español del clik derecho del drive en cloud.mail.ru

    https://cloud.mail.ru


    открЫТь В нОBOй вкладке
    скачать
    удалить
    копировать
    переместить
    переменовать
    получить ссылку
    удалить ссылку
    настроить доступ
    отправить по почте
    создать
    папку
    документ
    таблицу
    презентацию


    pestaña abierta en noboy
    descargar
    eliminar
    copia
    movimiento
    peremenovat
    obtener el enlace
    eliminar enlace
    configurar el acceso
    enviar por correo
    crear
    carpeta
    documento
    mesa
    presentación

    lunes, 3 de abril de 2017

    Simulaciones Electronicas, Eléctricas y de Circuitos con Falstad muy buenas

    Simulaciones Electronicas, Eléctricas y de Circuitos con Falstad muy buenas
    http://www.falstad.com/circuit/e-index.html


  • Basics


  • A/C Circuits
  • Passive Filters
  • Other Passive Circuits
  • Diodes
  • Op-Amps
  • MOSFETs
  • Transistors (Bipolar)
  • Combinational Logic
  • Sequential Logic
  • 555 Timer Chip
  • Transmission Lines
  • Memristors
  • Tunnel Diodes
  • Spark Gaps