it-e-72 Introduction To the Image Compression Manager

The Image Compression Manager provides your application with an interface for compressing
and decompressing images and sequences of images that is independent of devices and algorithms.
Uncompressed image data requires a large amount of storage space. Storing a single
640-by-480 pixel image in 32-bit color can require as much as 1.2 MB. Sequences of images, like
those that might be contained in a QuickTime movie, demand substantially more storage than
single images. This is true even for sequences that consist of fairly small images, because the
movie consists of such a large number of those images. Consequently, minimizing the storage
requirements for image data is an important consideration for any application that works with
images or sequences of images.
The Image Compression Manager allows your application to
use a common interface for all image-compression and image-decompression operations;
take advantage of any compression software or hardware that may be present in a given
Macintosh configuration;
store compressed image data in pictures;
temporarily compress sequences of images, further reducing the storage requirements of
movies;
display compressed PICT files without the need to modify your application;
use an interface that is appropriate for your applicationa high-level interface if you do
not need to manipulate many compression parameters or a low-level interface that
provides you greater control over the compression operation.
The Image Compression Manager compresses images by invoking image compressor components
and decompresses images using image decompressor components. Compressor and decompressor
components are code resources that present a standard interface to the Image Compression Manager and
provide image-compression and image-decompression services, respectively. The Image Compression
Manager receives application requests and coordinates the actions of the appropriate components. The
components perform the actual compression and decompression. Compressor and decompressor
components are standard components and are managed by the Component Manager. For detailed
information about creating compressor and decompressor components, see Inside Macintosh:
QuickTime Components.
Because the Image Compression Manager is independent of specific compression algorithms
and drivers, it provides a number of advantages to developers of image- compression algorithms.
Specifically, compressor and decompressor components can
present a common application interface for software-based compressors and hardware-based
compressors;

provide several different compressors and compression options, allowing the Image
Compression Manager or the application to choose the appropriate tool for a particular
situation.

substantially [səb'stænʃ(ə)li]
ad. 实质上,本质上,大体上

Continue reading it-e-72 Introduction To the Image Compression Manager

it-e-71 Application of Digital Image Processing

The field of digital image processing has experienced continuous and significant expansion
in recent years. The usefulness of this technology is apparent in many different disciplines
covering medicine through remote sensing【遥感】. The advances and wide availability of image
processing hardware has further enhanced the usefulness of image processing.
Remote sensing is the process of collecting data about objects or landscape features without
coming into direct physical contact with them.
Digital Image Processing is not only a step in the remote sensing process, but is itself a
process that consists of several steps. It is important to remember that the ultimate goal of this
process is to extract information from an image that is not readily apparent or is not available in
its original form. The steps taken in processing an image will vary from image to image for

multiple reasons, including the format and initial condition of the image, the information of
interest (i.e., geologic formations vs. land cover), the composition of scene elements. There are
three general steps in processing a digital image; preprocessing, display and enhancement, and
information extraction.
PreprocessingBefore digital images can be analyzed, they usually require some degree of
preprocessing. This may involve radiometric corrections, which attempt to remove the effects of
sensor errors and/or environmental factors.[1] A common method of determining what errors have
been introduced into an image is by modeling the scene at the time of data acquisition using
ancillary data collected.
Geometric corrections are also very common prior to any image analysis. If any types of
area, direction or distance measurements are to be made using an image, it must be rectified if
they are to be accurate.[2] Geometric rectification is a process by which points in an image are
registered to corresponding points on a map or another image that has already been rectified. The
goal of geometric rectification is to put image elements in their proper planimetric (x and y)
positions.
Information EnhancementThere are numerous procedures that can be performed to
enhance an image. However, they can be classified into two major categories: point operations
and local operations. Point operations change the value of each individual pixel independent of
all other pixel, while local operations change the value of individual pixels in the context of the
values of neighboring pixels. Common enhancements include image reduction, image
magnification, transect extraction, contrast adjustments (linear and non-linear), band ratioing,
spatial filtering, fourier transformations, principle components analysis, and texture
transformations.
Information ExtractionUnlike analog image processing, digital image processing
presently relies almost wholly on the primary elements of tone and color of image pixels.
There has been some success with expert systems and neural networks which attempt to
enable the computer to mimic the ways in which humans interpret images. Expert systems
accomplish this through the compilation of a large database of human knowledge gained from
analog image interpretation which the computer draws upon in its interpretations.[3] Neural
networks attempt to "teach" the computer what decisions to make based upon a training data set.
Once it has "learned" how to classify the training data successfully, it is used to interpret and
classify new data sets.
Once the remotely sensed data has been processed, it must be placed into a format that can
effectively transmit the information it was intended to. This can be done in a variety of ways
including a printout of the enhanced image itself, and image map, a thematic map, a spatial
database, summary statistics and/or graphs. Because there are a variety of ways in which the
output can be displayed, a knowledge not only of remote sensing, but of such fields GIS,
cartography, and spatial statistics are a necessity. With an understanding of these areas and how
they interact one with another, it is possible to produce output that give the user the information

needed without confusion. However, without such knowledge it is more probable that output will
be poor and difficult to use properly, thus wasting the time and effort expended in processing the
remotely sensed data.

 

1, ancillary  [æn'siləri]
a. 辅助的
n. 助手

2, rectify  ['rektifai]
v. 订正,矫正,改正

3, planimetric  [,pleinə'metric]
adj. 平面的
4, transect  [træn'sekt, -'zekt-, trɑ:n-]
n. 横断面
vt. 横断;横切
5, mimic  ['mimik]
a. 模仿的,假的
[计算机] 模拟的
6, analog 
n. 类似(模拟量)

Continue reading it-e-71 Application of Digital Image Processing

【转】磁道、柱面、扇区、磁盘簇、寻道时间、旋转延迟、存取时间

http://my.oschina.net/xiangxw/blog/11288

1.磁道

以盘片中心为圆心,用不同的半径,划分出不同的很窄的圆环形区域,称为磁道。

2.柱面

上下一串盘片中,相同半径的磁道所组成的一个圆柱型的环壁,就称为柱面。

3.扇区

磁盘上的每个磁道被等分为若干个弧段,这些弧段便是磁盘的扇区.扇区是磁盘最小的物理存储单元

4.磁盘簇(windows)

windows将相邻的扇区组合在一起,形成一个簇,然后再对簇进行管理

5.寻道时间

磁头从开始移动到移动到数据所在磁道所需要的时间

6.旋转延迟

165952_00Fr_96486

首先,读写头沿径向移动,移到要读取的扇区所在磁道的上方,这段时间称为寻道时间(seek time)。

然后,通过盘片的旋转,使得要读取的扇区转到读写头的下方,这段时间称为旋转延迟时间(rotational latency time)。

例:一个7200(转 /每分钟)的硬盘,每旋转一周所需时间为60×1000÷7200=8.33毫秒,则平均旋转延迟时间为8.33÷2=4.17毫秒(最多旋转1圈,最少不用旋转,平均情况下,需要旋转半圈)。[磁盘是顺时针转的,只会朝一个方向转]

7.存取时间

平均寻道时间与平均旋转延迟时间之和称为平均存取时间(average access time)

Continue reading 【转】磁道、柱面、扇区、磁盘簇、寻道时间、旋转延迟、存取时间

nosql 分类

类型

部分代表

特点

列存储

Hbase

Cassandra

Hypertable

顾名思义,是按列存储数据的。最大的特点是方便存储结构化和半结构化数据,方便做数据压缩,对针对某一列或者某几列的查询有非常大的IO优势。

文档存储

MongoDB

CouchDB

文档存储一般用类似json的格式存储,存储的内容是文档型的。这样也就有有机会对某些字段建立索引,实现关系数据库的某些功能。

key-value存储

Tokyo Cabinet / Tyrant

Berkeley DB

MemcacheDB

Redis

Riak

可以通过key快速查询到其value。一般来说,存储不管value的格式,照单全收。(Redis包含了其他功能)

图存储

Neo4J

FlockDB

图形关系的最佳存储。使用传统关系数据库来解决的话性能低下,而且设计使用不方便。

对象存储

db4o

Versant

通过类似面向对象语言的语法操作数据库,通过对象的方式存取数据。

xml数据库

Berkeley DB XML

BaseX

高效的存储XML数据,并支持XML的内部查询语法,比如XQuery,Xpath。

板桥的分类:http://www.jdon.com/jivejdon/thread/38312

>NoSQL数据库异军突起,随着Digg和 sf.net大型应用不断采取NoSQL,NoSQL运动已经蓬勃发展,NoSQL数据库很多,如何对他们分类,以便方便地根据自己应用特色选择不同的NoSQL数据库呢?

Continue reading nosql 分类

java hotspot虚拟机

hostspot从jdk1.3就出来了,是sun的新一代jvm技术,主要目的是提高性能。实际应用中需要设置参数:

http://www.hashei.me/2009/05/tuning-the-sun-hotspot-jdk.html

回收器选择 JVM给了三种选择:串行收集器、并行收集器[吞吐量]、并发收集器[响应速度],但是串行收集器只适用于小数据量的情况,所以这里的选择主要针对并行收集器和并发收集器。默认情况下,JDK5.0以前都是使用串行收集器,如果想使用其他收集器需要在启动时加入相应参数。JDK5.0以后,JVM会根据当前系统配置进行判断。

Continue reading java hotspot虚拟机

【评】《敏捷宣言》10周年系列纪念文章

相关文章:

http://www.infoq.com/news/2011/02/agile-manifesto-10-years-series

http://www.infoq.com/cn/articles/personal-reflection-agile-ten-years-mellor

http://www.infoq.com/cn/articles/agile-teenage-crisis

虽然没有完完全全的按部就班的实施过某种敏捷方法,但是实际开发中确实与其中的思想不谋而合。我关注敏捷是由于CMM/CMMI这个东西以及大量的书籍中的观点似乎完全忽略了人以及编码这些要素。似乎软件的管理就是一堆堆的文档规范,众多的委员会骑在开发者的头上,然我看了很反感。难道文档编好了加上坐在办公椅上审视报告就能制造高质量的能work的软件?你们把实际做事的放哪里去了?这很自然地助长了官僚主义。

敏捷的观点是另一派的,我了解了后觉得符合实际,这些人是从下到上实践来的观点。

这一系列文章也反思了一下敏捷,我觉得:

CMM/CMMI还是敏捷方法有时都代表了某些人的利益,被过大的强调了;

敏捷和注重设计的方法本身应该不是对立的,其目的是让软件做好,只是各有侧重,而侧重并不是说抛弃对方的观点。重要的是结合实际情况来实施,没有可以照抄的成功,实事求是才是真理。

敏捷揭露了CMM/CMMI以及过度设计的反面,但是敏捷需要与其它观点共存!

Continue reading 【评】《敏捷宣言》10周年系列纪念文章

parentNode,parentElement,offsetParent区别

parentNode与parentElement同义,但是parentElement不是w3c规范的。这里主要讨论parentNode,offsetParent的区别:

引用网上的介绍:

offsetParent直接的将是影响元素位置的上级element,而parentElement与位置显示无关时dom中的上级element。
例如:
  <BODY>
  <div   style="border:   1px   solid   black;position:absolute;"> 
  <form> 
  <input   type="checkbox"   id="cc"> 
  </form> 
  </div> 
这个例子中,“cc”元素的offsetParent是div,如果去掉div的position属性,那么cc的offsetParent就会变为body。而parentElement一直都为form。
与此相关的还有offsetLeft和offsetTop两种属性,他们分别表示的是元素与offsetElement相对应的左侧和顶部距离。 

另外的例子是table:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head></head>
	<script type="text/javascript">
		window.onload = function(){
			var el = document.getElementById('t2');
			alert(el.offsetParent.id);
		};	
	</script>
	<body style="width: 1000px;">
		<table id="tb">
			<tr id="tr1"><td>t1</td></tr>
			<tr id="tr2"><td id="t2">t2</td></tr>
		</table>
	</body>
</html>

可以看到td的offsetParent直接是table。

Continue reading parentNode,parentElement,offsetParent区别

it-e-70 Why You should Not Use JPEGs for Image Storage

If I were king, I'd banish JPEGs forever. JPEGs (pronounced "jay-pegs", and sometimes
spelled "JPGs") are the images you see all over the Web. Pictures stored as JPEGs are highly
compressed so they can be sent across the Internet faster. A picture that takes up 1 million bytes
can be squeezed down to 1/10th of that size if you turn it into a JPEG.
That would seem like a good idea. But it's actually a good idea gone bad. JPEGs are like
jigsaw puzzles that can never be put back together again right. Pieces will always be missing.

Every time you change a normal image into a JPEG, you lose part of the picture. You can never
get it back.
Remember that. I'll repeat it in a slightly different way to help out: When you create or save
a JPEG image, you lose part of the picture and you simply can't get it back, ever.
JPEGs are losers. They use what's called "lossy" compression. To squeeze an image's file
size down to something really small, the JPEG process tosses out 80 or 90 percent of the
information and fakes a lot of the rest. JPEGs take advantage of a trick of our eyesight. When we
see part of a small, familiar object, we automatically fill in the rest of it. JPEG processing breaks
an image up into a lot of small pieces and strips out a great deal of detail from each small piece.
A picture of your grandmother holding a shawl might show every detail ordinarily, but a
JPEG version might not show the way her fingers wrap around the fabric. Instead, they might be
depicted as areas of light and dark contrast that suggest an old woman's fingers. Your eyes and
brain do the rest. They turn what is only a suggestion of fingers into what your brain thinks is the
real thing.
This might be fine for some uses. But anyone who cares about digital photography should
consider JPEG as an enemy, not a friend. I'll bet you don't want that picture of grandma turned
into someone who looks sorta like grandma. You want the real thing.
JPEGs are one-way trips to the Badlands. Here's a familiar scenario. You have a normal,
non-compressed image. It's a Windows bitmap, maybe. (They're BMP files.) You open this
bitmap in your image-editing software and save it as a JPEG. The file is a lot smaller. You
celebrate a little. What a trick you just pulled!
Later, you realize you need to tweak the picture a little. Maybe you need to crop it. Maybe
you just want to make the colors more vivid.
So you open the JPEG in your image editor, make your changes and save the file as a JPEG
again.
The image you cropped or tweaked can't be the same as the one you started with. It was
already chopped up a lot by the JPEG processing, and when you saved it again it got chopped and
diced some more.
The PNG image format is the best thing since the wheel. PNG (pronounced "Ping," not "Pea
En Gee") means "Portable Network Graphics." When you save an image as a PNG, nothing gets
sliced or diced. A PNG is almost surely going to be smaller than a standard uncompressed image,
but it won't have any wounds. Cut it up all you want, slice it hither and yon. It will be all there,
even though it's smaller.
This miracle is actually just a trick of counting. We all do the same thing that PNGs do. We
learned this trick in grade school.
Here's how it works. Suppose you have a lot of sheep to count. You could count every
single one of them. Boring, right? Or you could count them by twos. Or maybe, if your eye is
quick, you could count them by threes.
Let's say you've done thismaybe you were trying the old technique of counting sheep to

get to sleep but it didn't workand now it's time to come up with the real number. If you counted
by twos, you just multiply your total by two. If you counted by threes, you multiply your number
by three.
Cool, right? You're storing something like 31 in your brain, but you can quickly turn that
into the real number62 or 93.
It's all shorthand. It's a perfectly sane mathematical trick. PNG uses the same approach. It
squeezes the data in an image file using tricks of math. Does the image have 61 pixels of nothing
but azure blue in one area? PNG stores that information as an instruction to make an azure blue
pixel 61 times. That takes up a lot less space than something like this: azure blue pixel, azure
blue pixel, azure blue pixel, ... you get the point.
The best part of this trick is the way it can be totally reversed without losses. the sky looks
exactly the way it was supposed to in the image with all those azure blue pixels. Storing
information by listing it as "1 pixel times 61" is the same as storing 61 pixels. Except that it
doesn't take up all that wasted space.
PNGs can't quite squeeze images as much as JPEGs can. There's no way to do it the lossless
way and get the same reduction in file size. But PNGs can cut an image down to anywhere from
one-half to one-third of its normal file size without any loss of data. Some images can be reduced
even more.
I took a few hundred uncompressed digital images and changed them from BMP to PNG to
find out how much space I could save. Most of them were 12 megabyte files stored as BMPs.
PNG squeezed these scans down to a little less than half their uncompressed size on average.
Some scans, especially ones that did not have much detail, compressed a lot more. But since I
started storing most of my digital images as PNGs, I've come to expect about a 50 percent to 60
percent savings in file space.
That might not seem like much compared to the way JPEG squeezes images, but it's a huge
bonus when you realize that PNG is harmless. Images are not changed in any way.
Good image viewers and editors know how to deal with PNG. If you don't see PNG listed as
an option in your image editor's "Save As" menu (under the "File" menu), you have old software
and should get a newer version.
If you don't have an image viewer of any kind, buy ACDSee, available for both Windows
PCs and Macintoshes.

1, shawl  [ʃɔ:l]
n. 披肩,围巾

2, sorta  ['sɔ:tə]
adv. 近似,有几分;可以说是

3, vivid  ['vivid]
a. 生动的,栩栩如生的,鲜艳的

4, dice  [dais]
vt. 切成方块
n. 骰子
vi. 掷骰子

5, sliced  [slaist]
adj. (食物)已切成薄片的
v. 切成薄片;分配(slice的过去式和过去分词)

6, yon  [jɔn]
adj. 那边的,彼处的
adv. 在那边,在远处
n. 那边,远处
pron. 彼处之人或物

7, chopped  
v. 斩碎(开裂,中断,多变,开路)

8, sane  [sein]
a. 神智健全的,理智的

9, azure  
n. 天蓝色,碧空
a. 蔚蓝的

10, squeeze  [skwi:z]
n. 压榨,挤
v. 紧握,挤

 

 

PNG原来是无损压缩位图

GIF也是无损压缩位图,只是由于压缩算法专利问题,逐渐被PNG取代。

http://zh.wikipedia.org/wiki/GIF

http://zh.wikipedia.org/wiki/PNG

Continue reading it-e-70 Why You should Not Use JPEGs for Image Storage

Pagination


Total views.

© 2013 - 2019. All rights reserved.

Powered by Hydejack v6.6.1