• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

減色プログラム


Commit MetaInfo

Revisãoda245e71c7b6e7ffeaaf7f9084afe17af956db83 (tree)
Hora2011-05-21 12:21:13
Autorberupon <berupon@gmai...>
Commiterberupon

Mensagem de Log

added copyright notice.

Mudança Sumário

Diff

--- a/color_quantizer.vcproj
+++ b/color_quantizer.vcproj
@@ -124,6 +124,7 @@
124124 EnableEnhancedInstructionSet="2"
125125 FloatingPointModel="2"
126126 UsePrecompiledHeader="2"
127+ BrowseInformation="1"
127128 WarningLevel="3"
128129 DebugInformationFormat="3"
129130 ForcedIncludeFiles="common.h"
@@ -144,6 +145,7 @@
144145 SubSystem="1"
145146 OptimizeReferences="2"
146147 EnableCOMDATFolding="2"
148+ RandomizedBaseAddress="1"
147149 TargetMachine="1"
148150 />
149151 <Tool
--- /dev/null
+++ b/idea.txt
@@ -0,0 +1,6 @@
1+
2+空間周波数が低いところは、色の広がりの範囲も広いはず。逆に周波数が高いところは色の変化も急激なはず。
3+
4+画像処理で、特徴のあるものを抽出して、減色の判断に利用する。
5+
6+色の要素ごとに重み付けを変えられる作りにしているが計算量が大きいので、簡略化してまとめた処理も用意する。
--- a/quantize.cpp
+++ b/quantize.cpp
@@ -1,3 +1,34 @@
1+//
2+// speed optimized scolorq by berupon at gmail dot com
3+//
4+// see original copyright notice.
5+//
6+// |
7+// |
8+// V
9+//
10+/* Copyright (c) 2006 Derrick Coetzee
11+
12+Permission is hereby granted, free of charge, to any person obtaining
13+a copy of this software and associated documentation files (the
14+"Software"), to deal in the Software without restriction, including
15+without limitation the rights to use, copy, modify, merge, publish,
16+distribute, sublicense, and/or sell copies of the Software, and to
17+permit persons to whom the Software is furnished to do so, subject to
18+the following conditions:
19+
20+The above copyright notice and this permission notice shall be
21+included in all copies or substantial portions of the Software.
22+
23+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
27+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
28+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30+*/
31+
132 #include "stdafx.h"
233
334 #include "quantize.h"
@@ -292,7 +323,6 @@ void compute_initial_s(
292323 const double* p_jcv = &coarse_variables(j_x, j_y, v);
293324 Color* ps = s.pBuff_ + v * palette_size + v;
294325 // TODO: 変更画像、縦方向ではなく横方向に操作する。後で転置。
295-// TODO: Color4fの全ての要素が同じなので、Array2D<Color4f> ではなく Array2D<float> で処理してみる。
296326 for (size_t alpha=v; alpha<palette_size; ++alpha) {
297327 *ps += (*p_jcv++) * b_ij2;
298328 ps += palette_size;