In general, the use of Java to implement a color map to grayscale graphics on Android, similar to the implementation method on J2ME, but encounter frequent conversion or large image conversion, you must use NDK to improve speed. This paper mainly through the Java and NDK two ways to achieve color map conversion to gray-scale map, and give a comparison of speed, for everyone's reference.
Let's start with a simple introduction to Android's NDK steps:
The gray-scale transformation in Photoshop enables R, G, and B three colors to be enhanced and then mixed in any proportion. The principle is similar to the following.The black and white transformations of black and white images are called grayscale transformations, the color transformations of color images are also called grayscale transformations, and the order transformations in Photoshop
In the pixel ma
2 principle of Image Color Filter-pseudo-color EncodingThe name of a color filter added to an image in the digital image processing field is pseudo-color encoding. It is implemented by assigning a gray or black/white image to a special color palette. We know that for Grayscale Images, the RGB values are equal, that is, for any pixel in the image, the red component value = green component value = blue component value.The general
brightness.Grayscale: The so-called grayscale color, refers to pure white, pure black and a series of the two from black to white transition color. In the RGB color model, the r=g=b of the grayscale color.The RGB color image is converted to grayscale, which is achieved by calculating the equivalent grayscale or lumina
Let's give you a detailed analysis of the various methods for converting color images to grayscale.Tutorial sharing:Method 1: convert menus to grayscaleThis may be the quickest, at least the most common method. Select a file and select "edit-edit color-convert to grayscale ".Click "next page". Let's take a look at the following method.Method 2: adjust the color balanceThis method can be used to control the black. Select a f
Cb21
Y ' 22
Cr21
Y ' 23
Start + 24:
Cb30
Y ' 30
Cr30
Y ' 31
Cb31
Y ' 32
Cr31
Y ' 33
Color Sample location.
0
1
2
3
0
Y
C
Y
Y
C
Y
1
Y
C
Y
Y
C
Y
2
Y
C
Y
Y
C
Y
3
Y
C
Y
Y
C
Grayscale histogram is the simplest and most useful tool for digital images. This article mainly summarizes the structure and application of cvhistogram in opencv.The definition of a grayscale histogram is a gray-level function that describes the number of pixels in the gray-level image (or the occurrence frequency of these pixels, the ordinate represents the number (frequency) of gray-level occurrences in
Image processing technology has penetrated into various fields of human life and is increasingly used. image processing involves many image formats, such as TIF, jemp, and BMP, in engineering applications, 256-level grayscale BMP images are often processed, such as those obtained through the black and white acquisition card. As one of the main image formats in windows, BMP grayscale images are highly popula
I have recently touched on image analysis and recorded some experiences. If there are any mistakes, please criticize and correct them!
I used the opencv API to read and write images,
This well-known library can be obtained at http://sourceforge.net/projects/opencvlibrary.
Image analysis and related operations are implemented using C.
First, let's take a look at how the histogram of the grayscale graph is calculated. It counts the number of occur
Histogram is translated into a histogram. In computer image processing and visual technology, histogram is usually used for image matching to complete the track. For example, in the meanshift tracking algorithm, the histogram of the image is often used.
For the histogram Calculation of a grayscale image, you must first select the number of Bin (which can be called a slot in Chinese). For a grayscale image,
Conversion from: Image Processing: black/white effect (grayscale processing)
1 .:
2. Implementation principle:Grayscale is to make the three color components R, G, and B of the same color value. Because the color value range is [0,255 ],There are only 256 levels, that is, grayscale images can only represent 256 gray colors. There are three common processing methods:* Maximum Method (maximum): r = G = B = ma
To grayscale the RGB image, the popular point is that the RGB three components of the image weighted average to get the final gray value. The most common weighting methods are as follows:1) gray=b;gray=g;gray=r2) Gray=max (B+G+R)3) gray= (B+G+R)/34) gray= 0.072169b+ 0.715160g+ 0.212671R5) gray= 0.11b+ 0.59g+ 0.3RThe first is the component method , which uses a component of the RGB three component as the gray value of the pointThe second method is the
Atitit. Verification Code Identification step4-------- grayscale of graphic binary value1. Summary of the method principle of common binary value 11.1. Method One: The method is very simple, after the RGB color image grayscale, the scanned image of each pixel value, the value is less than 127 The pixel value is set to 0 ( Black ), the pixel valuegreater than or equal to 127 is set to 255 ( white ). 11.2. M
Grayscale Image ImggrayWith the base above, the grayscale image is fairly simple.Color graph to Grayscale method:1. Floating-point algorithm: gray=r*0.3+g*0.59+b*0.112. Integer method: gray= (r*30+g*59+b*11)/1003. Shift Method: Gray = (r*28+g*151+b*77) gt;gt;8; ??4. Average method: gray= (R+G+B)/3;5. Take green only: gray=g;Floating point algorithm is used herevo
Myyuanlaipic = Imread (' e:/image/matlab/darkmouse.jpg ');% read images in RGB formatMyfirstgraypic = Rgb2gray (myyuanlaipic);% conversion of RGB to grayscale images with existing functions[Rows, cols, colors] = size (myyuanlaipic),% gets the parameters of the matrix of the original imageMidgraypic = zeros (rows, cols);% uses the resulting parameters to create a full-zero matrix, which is used to store grayscale
bottom of the implementation of two grayscale and old sepia effect, similar to flash shaderfilter.(The green ball is the original image, the upper and lower 2 balls are made using different sepia parameters to get the old effect)varSUGAR4 = Sugar.create (0,0,2); sugar4.x= SIZE.WIDTH/4; Sugar4.y = size.height/1.5; This. AddChild (SUGAR4); Sugar4.scale= 3; varSugar = sugar.create (0,0,2); Sugar.x= SIZE.WIDTH/2; Sugar.y = SIZE.HEIGHT/2; This. AddChild (
The structure of a grayscale image consists of four parts: File Header, BMP Information header, color palette, and BMP data content. The gray-scale palette has a total of 256 RGBQUAD structures and stores the gray-scale values ranging from 0 to 255. Each rgbRed, rgbGreen, and rgbBlue has the same component values.
Reference: BMP Image structure, read/write, and grayscaleGrayscale 24-bit BMP ImageThe specific steps for converting a 24-bit BMP image int
http://m.blog.csdn.net/blog/u014395105/41308979The recent study of how to use C + + to process images without the use of encapsulated OPENCV code is a good way to better understand OPENCV's internal principles.Search on the Internet some of the C + + code to achieve RGB (color) image conversion to Gray (grayscale) principle and code, poor readability, so I tidied up a bit, if necessary reprint, please indicate the source, thank you!First, learning Cvt
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.