The hidden picture is not something new, it is in most social software, the preview is a picture, and when you open it you see another picture. Although very early to see this kind of picture, but has not carefully studied its principle, today thought about a bit, found quite interesting, so I also wrote a simple algorithm to make two pictures together into a hidden picture.For example, the picture below.When the background color is white, it is usually in the preview state, it looks like thisAn
distribution of this picture.
Original:
Grayscale Channel: Red channel:
Green channel: Blue channel:
From the above four channels, we can find that the color of this picture is mainly low brightness, red, green and blue three colors in the high brightness area of the distribution are very small, and gray channel also indicates that the overall picture brightness value is very low.
In the previous article, I have told you that the human eye is
select other color ing tables, including custom color ing tables.If the image data matrix is a double-precision data type, value 1 points to the first row in the matrix map, and value 2 points to the second row;
If the image matrix is an 8-bit unsigned integer type or a 16-bit unsigned integer type, the value 0 points to the first row in the matrix map, and so on.
Example: display an index image:[X, MAP] = imread ('canoe. tif ');Image (X );Colormap (MAP );
2.
, the standard template method of custom filters is only similar to the processing process, so I can implement the optimization described later ).
Another parameter is smoothness, which is actually the number of gray bins. Let's assume that the gray level/brightness of the pixel (0 ~ 255) evenly divided into smoothness intervals, each interval is called a bucket here, so that we have many buckets, which are called a bucket array (buckets) for the moment ).
This algorithm traverses each pixel
Previously, to display grayscale images on the web, you only need to manually use the image software for conversion. But now we can implement this process with the help of HTML5 canvas, without the need for image editing software. I used HTML5 and jquery to make a demo to demonstrate how to implement this function.
Demo address: http://webdesignerwall.com/demo/html5-grayscale/
Purpose
This demo will show y
The basic idea of mathematical morphology is to measure and extract the corresponding shapes in the image with certain morphological elements to achieve the purpose of image analysis and recognition. There are four basic operations for mathematical morphology: corrosion, expansion, opening and closing. Based on these basic operations, it can be deduced and combined into practical algorithms of mathematical morphology. In this experiment, we implemented four morphological operations for binary im
"Perceptual Hashing algorithm" (perceptual hash algorithm), which generates a "fingerprint" (fingerprint) string for each image, and then compares the fingerprints of different images. The closer the result is, the more similar the picture is.Here is one of the simplest implementations:The first step is to reduce the size.Reduce the image to 8x8 's size, a total of 64 pixels. The role of this step is to remove the details of the picture, only the structure, shading and other basic information,
Limited Adaptive histogram equalization. In:p. Heckbert: Graphics Gems IV, Academic Press 1994 (http://www.docin.com/p-119164091.html)In fact, despite the principle of the algorithm, it still has a lot of obstacles in its implementation. But before this, I also need to explain that MATLAB has integrated the implementation of Clahe function Adapthisteq (), if you just need a result, actually directly use this function is the best choice. I'll give you some sample code to generate the effect show
These days doing some image processing, just to have a chance to try Python learned a long time ago, the result is very surprising to me, than my original optimistic imagination is more useful.Of course, first of all to thank the "Flower Butterfly", is his article "Using Python image processing" To help me strengthen the use of Python and PIL problem-solving ideas, for PiL some introduction and basic operations, you can see this article. My main point here is to introduce my experience in the us
flux, plus two components A and B, and the table represents from green to red and from blue to yellow.
Figure 7-12
Color mode
There are different color models in PHOTOSHOP6, such as RGB and CMYK, which have corresponding patterns. There are also black and white images, gray scale and other different models. You can see it in the mode in the Drop-down menu, as shown in Figure 7-14.
Figure 7-14
Bitmaps and grayscale images:
Bitmaps and
Article from the personal Baidu space---2012.2.23
One. Point arithmetic (pixel transform)
1. Linear transformation
Principle: f=a*f+b; Effect: A typical anti-color effect.
2. Valve value operation
Principle: If f
3. Window operations
Principle: Similar to the operation of the threshold, but in three paragraphs, the middle of the same period; effect: can remove background
4. Grayscale stretching
Principle: If x
Effect: stretches x1---x2 pixels to y1---
First, the chip pin definition and role
31:blank when BLANK was high and all outn outputs was forced OFF. GS counter is also reset.
When BLANK was low, OUTN was controlled by the grayscale PWM control.
24:GSCLK Reference clock for grayscale PWM control (square wave provided by TIME3)
1:SCLK Serial Data Shift Clock (provides transport SCLK for the write of Sin)
2:sin Serial Data input (high write to 1 low w
The development of the Times, now, CSS3, we also began to see the "Black and white effect" large-scale application of the actual possibility, the next introduction CSS3 greyscale filter implementation, interested friends can understand that may have long known, like Wenchuan this bad Day website all gray in IE can be easily implemented (Filter:gray;), however, at the time, other browsers were non-solvable. However, the development of the Times, now, the gradual progress of CSS3, we also began to
On June 16, April 20, 2013, at 08:02:46 A.M., a magnitude 103.0 earthquake occurred at the junction of Lushan County and Tianyan County (30.3 degrees east longitude and 7.0 degrees north latitude) in ya'an City, Sichuan Province, with a focal depth of 13 kilometers. On that day, many media have stopped some entertainment activities. "At 08:02:46 A.M., on January 1, April 20, 2013, a magnitude 103.0 earthquake occurred in Lushan County, ya'an City, Sichuan Province, at the junction of Tianyan Cou
I have briefly introduced the bitmap format, file header, information header, color table, and pixel bit in my first small MFC project (2, at that time, I was still operating on Visio to draw pictures by myself. However, at that time, it was really very vague, and I didn't even have the concept of grayscale or colored pictures. I did not hold a book to study it seriously. It is simply Google if I encounter anything I don't understand when I complete t
Implementation Method for changing the browser Gray:1. The simplest and most direct way is to gray the image. (Suitable for modifying a small number of images and compatible browsers)2. Use filters (ie filter and css3 filter) for control, such as (being able to modify all elements (including images), compatible with IE series and WebKit series)
-WebKit-filter: grayscale (100%);-o-filter: grayscale (100%);-
; glyph-> bitmap_top; // The distance from the highest point of the character to the baseline
Now, we assume that we want to draw characters at (posx, Posy) and (charposx, charposy) indicate the correct position of the characters.
Charposx = posx + bitmap_left;Charposy = posy + ascender-bitmap_top;
2, line spacingPlace the maximum character contour heightFtface-> size-> metrics. Height // maximum height of the character contour, 26.6 pointsHowever, I found that the height is too high, so I usual
vision, and image processing.1) Main process: if we want to identify a verification code from an image, or we want to detect and recognize a character from an image, the steps are summarized as follows:Image Acquisition: after obtaining a verification code, you can directly capture HTML through HTTP, analyze the image URL, download and save it.Pre-processing: the detection is the correct image format, which is converted to the appropriate format, compressed, cut out the ROI, remove noise,
Servletinputstreamwrapper (bytes); } @Override public int getcontentlength () {return bytes.length; } @Override public Long Getcontentlengthlong () {return Bytes.len Gth }}); } catch (IOException e) {rethrowruntimeexception (e); } return null; }For more examples of filter, you can refer to the official website: https://github.com/spring-cloud-samples/sample-zuul-filters4.3 grayscale re
69206210
Today took time to learn a bit before the pillow library, previously seen remember this library can be added to the picture text plus numbers, but also to convert the picture into a character painting, but has not been looking to learn this module, because the holiday does not have to train, so it was blind to engage in a bit
0, 工欲善其事, its prerequisiteThere are several ways to install the Pillow Library0. Install with PIP$ pip install pillow
1
1. Using Easy_instal
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.