echo | armeb-linux-gcc -dM -E - #define __DBL_MIN_EXP__ (-1021) #define __FLT_MIN__ 1.17549435e-38F #define __DEC64_DEN__ 0.000000000000001E-383DD #define __CHAR_BIT__ 8 #define __WCHAR_MAX__ 4294967295U #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 #define __FLT_EVAL_METHOD__ 0 #define __unix__ 1 #define __DBL_MIN_10_EXP__ (-307)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func ResizeImg(spath string, tpath []string, size []image.Point) (int, error) { | |
if len(tpath) != len(size) { | |
log.Println("GetImgThumb: ", tpath, size) | |
return 0, errors.New("GetImgThumb length unsafe") | |
} | |
cnt := 0 | |
for i, tgt := range tpath { | |
log.Println("+++", spath, tgt) | |
_, err := os.Stat(tgt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/nfnt/resize" | |
"os" | |
"path/filepath" | |
"image" | |
"image/jpeg" | |
"log" | |
"errors" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// 为一个小项目做准备,测试下数据结构的内存消耗情况 | |
// 初次接触Go语言,很多东西需要了解 | |
// 下面的结构体,创建1,000,000各 imgobj 时的log: | |
// 2013/08/09 14:53:42 alloc:307904, heapAlloc:307904 | |
// 2013/08/09 14:53:42 alloc:7469888, heapAlloc:7469888 | |
// 2013/08/09 14:53:42 alloc:12406664, heapAlloc:12406664 | |
// 2013/08/09 14:53:43 alloc:26354224, heapAlloc:26354224 | |
// 2013/08/09 14:53:43 alloc:24996016, heapAlloc:24996016 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
"fmt" | |
"strings" | |
"io/ioutil" | |
"regexp" | |
"strconv" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0.2392578125 | |
0.224609375 | |
0.2197265625 | |
0.21484375 | |
0.2197265625 | |
0.2001953125 | |
0.205078125 | |
0.1904296875 | |
0.1904296875 | |
0.1904296875 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* [2013-07-06 六 12:18] IF.Q | |
* 脉搏检测 | |
* */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef int beatype; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ifqqfi在gmail.com | |
* [2013-07-05 五] | |
* | |
* 脉搏检测程序 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file reco_sym.cpp | |
* @brief this is a simple try for kin san's pj, which need to reco some | |
* symbol like tree branch shape. | |
* @author ifqqfi gmail | |
* | |
*/ | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/highgui/highgui.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is just a test | |
for( size_t i = 0; i < contours.size(); i++ ) { | |
approxPolyDP( Mat(contours[i]), contours_poly[i], 3, true ); | |
boundRect[i] = boundingRect( Mat(contours_poly[i]) ); | |
minEnclosingCircle( contours_poly[i], center[i], radius[i] ); | |
} |