2012年3月11日 星期日

Preview Office Document in PDF(with Security) or JPEG


1. Use OpenOffice(portable version) to export PDF with security
2. Use ImageMagick to convert PDF to JPEG

2012年2月8日 星期三

Computer Programming Bugs

承認自己孤陋寡聞, 但知道了就要學起來, 原來Bug是有學理上的分類的, Heisenbug和Bohrbug是最常遇到的, 定義請參照Wiki或去問Google, 還有其他的bug類型, 但我覺得廣義去分類, 應該這兩種就夠了, 甚至也不用什麼分類, 有Bug是必然的, 弄清楚系統和平台運作原理, 熟悉各種Debug技巧, 什麼類型的Bug都無所謂, 適時適地擬定對策去解決問題比較重要, 老是執著在分析問題, 卻提不出解決辦法也沒用, 能完整詳細的分析問題當然很好, 但不要忘了, 解決問題才是最終的目的, 在分析問題時, 要同時把對策一併設想, 這樣才會有效率

http://en.wikipedia.org/wiki/Heisenbug


2012年1月18日 星期三

哪一種resize最好

http://www.dchome.net/viewthread.php?tid=346632

Lanczos-3 的效果最好, 其次是Bicubic, 最後是Bilinear

2012年1月6日 星期五

Feature Detect in OpenCV


OpenCV v2.3 documentation
http://opencv.itseez.com/index.html
OpenCV Tutorials in OpenCV v2.3 documentation
http://opencv.itseez.com/doc/tutorials/tutorials.html

feature2d module. 2D Features framework
http://opencv.itseez.com/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html
1. Harris corner detector
http://opencv.itseez.com/doc/tutorials/features2d/trackingmotion/harris_detector/harris_detector.html

2. Shi-Tomasi corner detector
http://opencv.itseez.com/doc/tutorials/features2d/trackingmotion/good_features_to_track/good_features_to_track.html

3. Creating yor own corner detector
http://opencv.itseez.com/doc/tutorials/features2d/trackingmotion/generic_corner_detector/generic_corner_detector.html

4. Detecting corners location in subpixeles
http://opencv.itseez.com/doc/tutorials/features2d/trackingmotion/corner_subpixeles/corner_subpixeles.html

5. Feature Detection
http://opencv.itseez.com/doc/tutorials/features2d/feature_detection/feature_detection.html
   1). Use the FeatureDetector interface in order to find interest points. Specifically:
       a) Use the SurfFeatureDetector and its function detect to perform the detection process
       b) Use the function drawKeypoints to draw the detected keypoints
6. Feature Description
http://opencv.itseez.com/doc/tutorials/features2d/feature_description/feature_description.html
   1). Use the DescriptorExtractor interface in order to find the feature vector correspondent to the keypoints. Specifically:
       a) Use SurfDescriptorExtractor and its function compute to perform the required calculations.
       b) Use a BruteForceMatcher to match the features vector
       c) Use the function drawMatches to draw the detected matches.

7. Feature Matching with FLANN
http://opencv.itseez.com/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html

8. Features2D + Homography to find a known object
http://opencv.itseez.com/doc/tutorials/features2d/feature_homography/feature_homography.html
   1). Use the function findHomography to find the transform between matched keypoints.
   2). Use the function perspectiveTransform to map the points.

9. Detection of planar objects
http://opencv.itseez.com/doc/tutorials/features2d/detection_of_planar_objects/detection_of_planar_objects.html
   1). Create a new console project. Read two input images.
   2). Detect keypoints in both images.
   3). Compute descriptors for each of the keypoints.
   4). Now, find the closest matches between descriptors from the first image to the second:
   5). Visualize the results:
   6). Find the homography transformation between two sets of points:
   7). Create a set of inlier matches and draw them. Use perspectiveTransform function to map points with homography:
   8). Use drawMatches for drawing inliers.

2012年1月5日 星期四

.eml 改成 .mht 就可以用IE開啦

就如標題所說
.eml 改成 .mht 就可以用IE開啦

這樣可以解決用文字編輯器開會出現不對的編碼問題

2012年1月4日 星期三

產品研發前期評估 or Self Test


一般Project初期,為了方便軟體同步開發,或是demo, 是會做模擬器.

可能是純軟體的, 也可能是拿類似機種改的, 也可能拿實驗平台組出來的,例如Labview.

都沒有的,基本上除非很有把握,不然後面都會很辛苦.

或許也不叫模擬器, 其實在Test-Oriented programming來說, 就是測試程式, 只是不一定以軟體存在,只要能方便做function test, 什麼形式都可以, 這和機構,電子, 軟韌體領域無關, 只是在軟體界, 以及測試量測領域, 很習慣這樣去兜出要的系統, 但以我寫System FW or DSP FW的經驗, 是一樣可行的, 而且除了可以做self-test, 要釐清整合的問題也很方便.

2011年12月30日 星期五

再看Design Pattern

最近有機會重新思考軟體建構的深度, 最終目標當然是能把Design Pattern化為己用, 而不是只能看懂別人的用法.

基本上, 個人認為, 雖然四人幫的著作是Design Pattern的鼻祖, 但真正發揚光大感覺是Java出現以後, 繼之前高先生的Android Design Pattern之後, 說真的, 要驗證是不是真的融入自己的招式,就看自己的思路就可以知道, 幾乎不太想得出當初理解的感覺, 不是書上寫得太牽強, 就是我還沒辦法融會.

看到書架上還有一本2002年出版的,"Design Patterns於Java語言上的實習應用", 是日本人寫的, 大略看了一下, 應該會有更好的感覺才是, 光K武功祕笈始終不夠, 一定要能融會到自己的系統邏輯, 才能衍伸出自己的一套用法.

寫程式的年資和寫程式的能力是沒有關係的, 真正要晉升到另一個層次, 還是要靠高段的思考邏輯以及融會前人累積的解題模型, 針對系統所處的情境最適當的設計.