令人惊奇的图像缩放算法
裁图,缩放,这些是图像处理中最常见不过的,但是当我们需要将大图裁剪或者缩放为其他的尺寸时,
往往是机械的,缩小后的图形要么不清晰,要么是裁剪后丢失了部分可见的信息。今天sig2007上展示了一段
视频,演示了一个新的算法,能够依据图像的内容来自适应的裁剪,裁剪或者缩放后的图形没有失真,模糊等等:
http://www.youtube.com/v/c-SSu3tJ3ns
Icc10编译 Mysql5 x86_64
Intel发布了新版本的Icc编译器,针对新xeon 多核等提供了更好的优化。MysqlAB提供的编译版本比较老用的icc8.1,
我自己重新编译了,不过rpm版本的比较麻烦,最后决定不使用rpm编译了。
采用的静态链接,无法使用ipo,具体的脚本如下:
CC=icc \
CXX=icpc \
CFLAGS="-O3 -ip -static -static-intel -no-gcc -no-prec-div -mp -unroll2 -xT" \
CXXFLAGS="-O3 -ip -static -static-intel -no-gcc -no-prec-div -mp -unroll2 -xT" \
LDFLAGS=' -static -static-intel' \
LD=xild \
AR=xiar \
./configure \
--prefix=/usr/local/mysql \
--with-server-suffix='-chinavisual-icc10-compiled' \
--enable-assembler \
--enable-local-infile \
--with-readline \
--disable-shared \
--with-extra-charsets=all \
--enable-thread-safe-client \
--without-embedded-server\
--with-ndbcluster \
--with-innodb \
--with-archive-storage-engine \
--with-blackhole-storage-engine \
--with-federated-storage-engine \
-with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \
--with-zlib-dir=bundled \
-with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static \
--with-big-tables
make clean
make install
另,由于是二进制版本,需要安装:
$ cat install_mysql.sh
#!/bin/bash
groupadd mysql
useradd -g mysql mysql
chown mysql.mysql -R .
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
cp support-files/my-medium.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysql
chkconfig --add mysql
/etc/init.d/mysql start