Fix the compiling bug when using `pip install mmcv` (#88)

* rename flowWarp to FlowWarp

* fix the compiling bug when using pip install

* update version to v0.2.10
pull/89/head v0.2.10
Kai Chen 2019-07-07 21:41:31 +08:00 committed by GitHub
parent 0ad15a508e
commit e5ca8846c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 7 deletions

1
MANIFEST.in 100644
View File

@ -0,0 +1 @@
include mmcv/video/optflow_warp/*.hpp

View File

@ -1 +1 @@
__version__ = '0.2.9'
__version__ = '0.2.10'

View File

@ -1,6 +1,6 @@
#include <flow_warp.hpp>
#include "flow_warp.hpp"
void flowWarp(double* img, double* flow, double* out, const int height,
void FlowWarp(double* img, double* flow, double* out, const int height,
const int width, const int channels, const int filling_value = 0,
const int interpolateMode = 0) {
for (int h = 0; h < height; h++) {

View File

@ -4,7 +4,7 @@
using namespace std;
void flowWarp(double* img, double* flow1, double* out, const int height,
void FlowWarp(double* img, double* flow1, double* out, const int height,
const int width, const int channels, const int filling_value,
const int interpolateMode);

View File

@ -6,7 +6,7 @@ cimport numpy as np
np.import_array()
cdef extern from "flow_warp.hpp":
void flowWarp(double* img, double* flow1, double* out, const int height, const int width, const int channels, const int filling_value, const int interpolateMode)
void FlowWarp(double* img, double* flow1, double* out, const int height, const int width, const int channels, const int filling_value, const int interpolateMode)
def flow_warp_c(np.ndarray[double, ndim=3, mode="c"] img_array not None,
np.ndarray[double, ndim=3, mode="c"] flow_array not None,
@ -15,7 +15,7 @@ def flow_warp_c(np.ndarray[double, ndim=3, mode="c"] img_array not None,
out_array = np.zeros_like(img_array)
flowWarp(<double*> np.PyArray_DATA(img_array),
FlowWarp(<double*> np.PyArray_DATA(img_array),
<double*> np.PyArray_DATA(flow_array),
<double*> np.PyArray_DATA(out_array),
out_array.shape[0],

View File

@ -36,7 +36,7 @@ EXT_MODULES = [
'./mmcv/video/optflow_warp/flow_warp.cpp',
'./mmcv/video/optflow_warp/flow_warp_module.pyx'
],
include_dirs=[numpy.get_include(), './mmcv/video/optflow_warp/'],
include_dirs=[numpy.get_include()],
language="c++",
),
]