e662. 取的图像的色彩模型
// This method returns the color model of an image
public static ColorModel getColorModel(Image image) {
// If buffered image, the color model is readily available
if (image instanceof BufferedImage) {
BufferedImage bimage = (BufferedImage)image;
return bimage.getColorModel();
} // Use a pixel grabber to retrieve the image's color model;
// grabbing a single pixel is usually sufficient
PixelGrabber pg = new PixelGrabber(image, 0, 0, 1, 1, false);
try {
pg.grabPixels();
} catch (InterruptedException e) {
}
ColorModel cm = pg.getColorModel();
return cm;
}
Related Examples |
e662. 取的图像的色彩模型的更多相关文章
- 基于YCbCr色彩模型的简易肤色识别器
一.实验方法 实验共选取了12张图像,利用画笔工具在每幅图像上选取5个点,并分别记录RGB值.取点方式如下图所示: 总共70个点,R,G,B的值分别如下表所示: RGB色彩模型和YCbC ...
- PowerShell定时抓取屏幕图像
昨天的博文写了定时记录操作系统行为,其实说白了就是抓取了击键的记录和对应窗口的标题栏,而很多应用程序标题栏又包含当时记录的文件路径和文件名,用这种方式可以大致记录操作了哪些程序,打开了哪些文 ...
- 8 个优秀的 Linux 图形图像及色彩工具
8 个优秀的 Linux 图形图像及色彩工具 1. 硬件色彩分析器LPROF LPROF 是一个用于创建设备兼容,如相机.扫描仪.显示器的ICC兼容型材的颜色分析器.这些配置提供跨设备的色彩一致性.他 ...
- Lab 色彩模型和取值范围
L∈(0,100) a∈(-128,127) b∈(-128,127) opencv 的Lab数据对齐做了量化,使其处于0-255范围 L=L*2.55 a=a+128 b=b+128
- 利用GDI+处理图像的色彩
首先先介绍一下ColorMatrix结构体:表示颜色的变换关系,定义如下: typedef struct { REAL m[][]; } ColorMatrix; ColorMatrix结构体一般和I ...
- 在python3下使用OpenCV 抓取摄像头图像并实时显示3色直方图
以下代码为在Python3环境下利用OpenCV 抓取摄像头的实时图像, 通过OpenCV的 calHist函数计算直方图, 并显示在3个不同窗口中. import cv2 import numpy ...
- 在python3下使用OpenCV 抓取摄像头图像提取蓝色
工作中需要对摄像头进行调试, Python平台大大提高调试效率. 从网找到段代码, 可以从摄像头图像中抠出蓝色. import cv2 import numpy as np cap = cv2.Vi ...
- Opencv图像变成灰度图像、取反图像
#include <iostream>#include <opencv2/opencv.hpp> using namespace cv;using namespace std; ...
- e663. 在gif图像中获取透明和色彩的数量
A IndexColorModel is used to represent the color table of a GIF image. // Get GIF image Image image ...
随机推荐
- CentOS7 安装配置DNS服务器
一.安装 yum install bind 二.配置 1. /etc/named.conf // // named.conf // // Provided by Red Hat bind packag ...
- VirtualBOX 不能mount优盘,移动硬盘解决方案
The Solution (basically nayasis' solution with the second driver installation added): Safely unplug ...
- django中数据库的相关操作
一.使用环境 python2.7,django>1.7 二.数据库进行配置 在setting文件中进行修改 1.找到DATABASES DATABASES = { 'default': { 'E ...
- 简单易懂的laravel事件,这个功能非常的有用(监听事件,订阅者模式)
先说一下在什么场景会使用这个事件功能. 事情大概是这样的,需求要在用户注册的时候发一些帮助邮件给用户(原本用户在注册之后已经有发别的邮件的了,短信,IM什么的) 原来这个注册的方法也就10多行代码.但 ...
- Redis监控技巧总结
Redis 监控最直接的方法当然就是使用系统提供的 info 命令来做了,你只需要执行下面一条命令,就能获得 Redis 系统的状态报告. redis-cli info 内存使用 如果 Redis 使 ...
- [hihoCoder] #1096 : Divided Product
时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Given two positive integers N and M, please divide N into sev ...
- paip.分布式应用系统java c#.net php的建设方案
paip.分布式应用系统java c#.net php的建设方案 1. 基础设施的建立 1 2. 本地的的调用API 1 3. 数据的传输 1 4. 代码的传输 1 5. 代码的自动热编译 2 6. ...
- ISE联合modelsim功能仿真和综合后仿真1
1.代码输入 (1).新建一个ISE工程,名字为count4. (2).新建一个verilog文件 (3).选择verilog module 输入file name为count4,单击next默认知道 ...
- Amoeba软件实现mysql读写分离
一般不用,大公司都是自己程序实现的. 安装amoeba
- [na]tftp从linux下载文件
1,背景: 当我们ssh到一台linux上时候,从linux上下载一些文件,方案如下: 1.1通过sftp:通过win7 ftp客户端连接到linux去下载文件. 1.2通过tftp 2,问题 有些l ...