forked from stephanepechard/iphone_opencv_test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenCV-2.3.1.patch
305 lines (261 loc) · 9.28 KB
/
OpenCV-2.3.1.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
diff -crB OpenCV-2.3.1/CMakeLists.txt ../OpenCV-2.3.1/CMakeLists.txt
*** OpenCV-2.3.1/CMakeLists.txt Mon Sep 12 20:45:38 2011
--- ../OpenCV-2.3.1/CMakeLists.txt Tue Dec 13 11:16:29 2011
***************
*** 337,343 ****
set(OPENCV_BUILD_3RDPARTY_LIBS FALSE CACHE BOOL "Build 3rd party libraries")
endif()
! include(OpenCVPCHSupport.cmake REQUIRED)
include(OpenCVModule.cmake REQUIRED)
if(ANDROID)
include(OpenCVAndroidProject.cmake REQUIRED)
--- 337,343 ----
set(OPENCV_BUILD_3RDPARTY_LIBS FALSE CACHE BOOL "Build 3rd party libraries")
endif()
! #include(OpenCVPCHSupport.cmake REQUIRED)
include(OpenCVModule.cmake REQUIRED)
if(ANDROID)
include(OpenCVAndroidProject.cmake REQUIRED)
diff -crB OpenCV-2.3.1/modules/CMakeLists.txt ../OpenCV-2.3.1/modules/CMakeLists.txt
*** OpenCV-2.3.1/modules/CMakeLists.txt Mon Sep 12 20:44:07 2011
--- ../OpenCV-2.3.1/modules/CMakeLists.txt Tue Dec 13 11:16:29 2011
***************
*** 33,42 ****
endif()
add_subdirectory(video)
! add_subdirectory(traincascade)
! add_subdirectory(haartraining)
if(NOT ANDROID)
add_subdirectory(gpu)
! add_subdirectory(stitching)
endif()
--- 33,42 ----
endif()
add_subdirectory(video)
! #add_subdirectory(traincascade)
! #add_subdirectory(haartraining)
if(NOT ANDROID)
add_subdirectory(gpu)
! # add_subdirectory(stitching)
endif()
diff -crB OpenCV-2.3.1/modules/contrib/src/chamfermatching.cpp ../OpenCV-2.3.1/modules/contrib/src/chamfermatching.cpp
*** OpenCV-2.3.1/modules/contrib/src/chamfermatching.cpp Mon Sep 12 20:42:33 2011
--- ../OpenCV-2.3.1/modules/contrib/src/chamfermatching.cpp Tue Dec 13 11:16:29 2011
***************
*** 908,917 ****
circle(templ_color,Point(center.x + pad, center.y + pad),1,CV_RGB(0,255,0));
! namedWindow("templ",1);
! imshow("templ",templ_color);
! cvWaitKey(0);
templ_color.release();
}
--- 908,917 ----
circle(templ_color,Point(center.x + pad, center.y + pad),1,CV_RGB(0,255,0));
! //namedWindow("templ",1);
! //imshow("templ",templ_color);
! //cvWaitKey(0);
templ_color.release();
}
diff -crB OpenCV-2.3.1/modules/features2d/src/oneway.cpp ../OpenCV-2.3.1/modules/features2d/src/oneway.cpp
*** OpenCV-2.3.1/modules/features2d/src/oneway.cpp Mon Sep 12 20:43:49 2011
--- ../OpenCV-2.3.1/modules/features2d/src/oneway.cpp Tue Dec 13 11:16:29 2011
***************
*** 665,671 ****
cvMinMaxLoc(m_samples[i], 0, &maxval);
cvConvertScale(m_samples[i], patch, 255/maxval);
! cvSaveImage(buf, patch);
cvReleaseImage(&patch);
}
--- 665,671 ----
cvMinMaxLoc(m_samples[i], 0, &maxval);
cvConvertScale(m_samples[i], patch, 255/maxval);
! //cvSaveImage(buf, patch);
cvReleaseImage(&patch);
}
***************
*** 1792,1803 ****
sprintf(filename, "%s/%s", path, imagename);
//printf("Reading image %s...", filename);
! IplImage* img = cvLoadImage(filename, CV_LOAD_IMAGE_GRAYSCALE);
//printf("done\n");
extractPatches (img, patches, patch_size);
! cvReleaseImage(&img);
}
fclose(pFile);
}
--- 1792,1803 ----
sprintf(filename, "%s/%s", path, imagename);
//printf("Reading image %s...", filename);
! /*IplImage* img = cvLoadImage(filename, CV_LOAD_IMAGE_GRAYSCALE);
//printf("done\n");
extractPatches (img, patches, patch_size);
! cvReleaseImage(&img);*/
}
fclose(pFile);
}
diff -crB OpenCV-2.3.1/modules/highgui/CMakeLists.txt ../OpenCV-2.3.1/modules/highgui/CMakeLists.txt
*** OpenCV-2.3.1/modules/highgui/CMakeLists.txt Mon Sep 12 20:41:29 2011
--- ../OpenCV-2.3.1/modules/highgui/CMakeLists.txt Tue Dec 13 11:16:29 2011
***************
*** 62,72 ****
endif()
endif()
! if(WITH_OPENEXR AND OPENEXR_FOUND)
! add_definitions(-DHAVE_OPENEXR)
! include_directories(${OPENEXR_INCLUDE_PATHS})
! set(GRFMT_LIBS ${GRFMT_LIBS} ${OPENEXR_LIBRARIES})
! endif()
if(MSVC)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:libcmt.lib")
--- 62,72 ----
endif()
endif()
! #if(WITH_OPENEXR AND OPENEXR_FOUND)
! # add_definitions(-DHAVE_OPENEXR)
! # include_directories(${OPENEXR_INCLUDE_PATHS})
! # set(GRFMT_LIBS ${GRFMT_LIBS} ${OPENEXR_LIBRARIES})
! #endif()
if(MSVC)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:libcmt.lib")
***************
*** 83,89 ****
src/cap.cpp
src/cap_images.cpp
src/cap_ffmpeg.cpp
! src/loadsave.cpp
src/precomp.cpp
src/utils.cpp
src/window.cpp
--- 83,89 ----
src/cap.cpp
src/cap_images.cpp
src/cap_ffmpeg.cpp
! # src/loadsave.cpp
src/precomp.cpp
src/utils.cpp
src/window.cpp
***************
*** 191,197 ****
if(APPLE)
add_definitions(-DHAVE_QUICKTIME=1)
if(NOT OPENCV_BUILD_3RDPARTY_LIBS)
! add_definitions(-DHAVE_IMAGEIO=1)
endif()
if (NOT HAVE_QT)
--- 191,197 ----
if(APPLE)
add_definitions(-DHAVE_QUICKTIME=1)
if(NOT OPENCV_BUILD_3RDPARTY_LIBS)
! # add_definitions(-DHAVE_IMAGEIO=1)
endif()
if (NOT HAVE_QT)
***************
*** 199,213 ****
add_definitions(-DHAVE_CARBON=1)
set(highgui_srcs ${highgui_srcs} src/window_carbon.cpp)
else()
! add_definitions(-DHAVE_COCOA=1)
! set(highgui_srcs ${highgui_srcs} src/window_cocoa.mm)
endif()
endif()
if(WITH_QUICKTIME)
set(highgui_srcs ${highgui_srcs} src/cap_qt.cpp)
else()
! set(highgui_srcs ${highgui_srcs} src/cap_qtkit.mm)
endif()
endif(APPLE)
--- 199,213 ----
add_definitions(-DHAVE_CARBON=1)
set(highgui_srcs ${highgui_srcs} src/window_carbon.cpp)
else()
! # add_definitions(-DHAVE_COCOA=1)
! # set(highgui_srcs ${highgui_srcs} src/window_cocoa.mm)
endif()
endif()
if(WITH_QUICKTIME)
set(highgui_srcs ${highgui_srcs} src/cap_qt.cpp)
else()
! # set(highgui_srcs ${highgui_srcs} src/cap_qtkit.mm)
endif()
endif(APPLE)
diff -crB OpenCV-2.3.1/modules/objdetect/src/latentsvm.cpp ../OpenCV-2.3.1/modules/objdetect/src/latentsvm.cpp
*** OpenCV-2.3.1/modules/objdetect/src/latentsvm.cpp Mon Sep 12 20:43:22 2011
--- ../OpenCV-2.3.1/modules/objdetect/src/latentsvm.cpp Tue Dec 13 11:39:30 2011
***************
*** 388,394 ****
cvRectangle(image, points[i], oppositePoint,
color, thickness, line_type, shift);
}
! cvShowImage("Initial image", image);
return LATENT_SVM_OK;
}
--- 388,394 ----
cvRectangle(image, points[i], oppositePoint,
color, thickness, line_type, shift);
}
! //cvShowImage("Initial image", image);
return LATENT_SVM_OK;
}
***************
*** 442,448 ****
color, thickness, line_type, shift);
}
}
! cvShowImage("Initial image", image);
return LATENT_SVM_OK;
}
--- 442,448 ----
color, thickness, line_type, shift);
}
}
! //cvShowImage("Initial image", image);
return LATENT_SVM_OK;
}
***************
*** 476,482 ****
cvRectangle(img, points[i], oppositePoints[i],
color, thickness, line_type, shift);
}
! cvShowImage("Initial image", img);
return LATENT_SVM_OK;
}
--- 476,482 ----
cvRectangle(img, points[i], oppositePoints[i],
color, thickness, line_type, shift);
}
! //cvShowImage("Initial image", img);
return LATENT_SVM_OK;
}
diff -crB OpenCV-2.3.1/modules/objdetect/src/latentsvmdetector.cpp ../OpenCV-2.3.1/modules/objdetect/src/latentsvmdetector.cpp
*** OpenCV-2.3.1/modules/objdetect/src/latentsvmdetector.cpp Mon Sep 12 20:43:22 2011
--- ../OpenCV-2.3.1/modules/objdetect/src/latentsvmdetector.cpp Tue Dec 13 11:18:48 2011
***************
*** 97,103 ****
CvSeq* result_seq = 0;
int error = 0;
! cvConvertImage(image, image, CV_CVTIMG_SWAP_RB);
// Getting maximum filter dimensions
getMaxFilterDims((const CvLSVMFilterObject**)(detector->filters), detector->num_components,
detector->num_part_filters, &maxXBorder, &maxYBorder);
--- 97,103 ----
CvSeq* result_seq = 0;
int error = 0;
! //cvConvertImage(image, image, CV_CVTIMG_SWAP_RB);
// Getting maximum filter dimensions
getMaxFilterDims((const CvLSVMFilterObject**)(detector->filters), detector->num_components,
detector->num_part_filters, &maxXBorder, &maxYBorder);
***************
*** 132,138 ****
detection.rect = bounding_box;
cvSeqPush(result_seq, &detection);
}
! cvConvertImage(image, image, CV_CVTIMG_SWAP_RB);
freeFeaturePyramidObject(&H);
free(points);
--- 132,138 ----
detection.rect = bounding_box;
cvSeqPush(result_seq, &detection);
}
! //cvConvertImage(image, image, CV_CVTIMG_SWAP_RB);
freeFeaturePyramidObject(&H);
free(points);