projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version update
[goodguy/history.git]
/
cinelerra-5.1
/
plugins
/
moveobj
/
moveobj.C
diff --git
a/cinelerra-5.1/plugins/moveobj/moveobj.C
b/cinelerra-5.1/plugins/moveobj/moveobj.C
index b40e5f6bb0832ec47c00cc9eeb5b5ba96929c7ed..77a80a3bbd59f8cbeb6ae77de38f115e75a0f6b9 100644
(file)
--- a/
cinelerra-5.1/plugins/moveobj/moveobj.C
+++ b/
cinelerra-5.1/plugins/moveobj/moveobj.C
@@
-153,12
+153,12
@@
void MoveObj::update_gui()
}
void MoveObj::to_mat(Mat &mat, int mcols, int mrows,
}
void MoveObj::to_mat(Mat &mat, int mcols, int mrows,
- VFrame *inp, int ix,int iy,
BC_CModel
mcolor_model)
+ VFrame *inp, int ix,int iy,
int
mcolor_model)
{
int mcomp = BC_CModels::components(mcolor_model);
int mbpp = BC_CModels::calculate_pixelsize(mcolor_model);
int psz = mbpp / mcomp;
{
int mcomp = BC_CModels::components(mcolor_model);
int mbpp = BC_CModels::calculate_pixelsize(mcolor_model);
int psz = mbpp / mcomp;
- int mdepth = psz < 2 ? CV_8U :
CV_16U
;
+ int mdepth = psz < 2 ? CV_8U :
psz < 4 ? CV_16U : CV_32F
;
if( mat.dims != 2 || mat.depth() != mdepth || mat.channels() != mcomp ||
mat.cols != mcols || mat.rows != mrows ) {
mat.release();
if( mat.dims != 2 || mat.depth() != mdepth || mat.channels() != mcomp ||
mat.cols != mcols || mat.rows != mrows ) {
mat.release();
@@
-249,13
+249,13
@@
int MoveObj::process_buffer(VFrame *frame, int64_t start_position, double frame_
to_mat(next_mat, w,h, iframe, 0,0, BC_GREY8);
int corner_count = MAX_COUNT;
to_mat(next_mat, w,h, iframe, 0,0, BC_GREY8);
int corner_count = MAX_COUNT;
- int
search_radius
= config.block_size;
+ int
block_size
= config.block_size;
int min_distance = config.search_radius;
goodFeaturesToTrack(next_mat,
*next_corners, corner_count, 0.01, // quality_level
int min_distance = config.search_radius;
goodFeaturesToTrack(next_mat,
*next_corners, corner_count, 0.01, // quality_level
- min_distance, noArray(),
search_radius
,
-
0,
// use_harris
+ min_distance, noArray(),
block_size
,
+
false,
// use_harris
0.04); // k
ptV pt1, pt2;
0.04); // k
ptV pt1, pt2;
@@
-334,7
+334,7
@@
int MoveObj::process_buffer(VFrame *frame, int64_t start_position, double frame_
// interpolate with identity matrix
accum_matrix = w0*identity + w1*accum_matrix;
// interpolate with identity matrix
accum_matrix = w0*identity + w1*accum_matrix;
- AffineMatrix matrix;
+ AffineMatrix
&matrix = affine->
matrix;
for( int i=0,k=0; i<3; ++i )
for( int j=0; j<3; ++j )
matrix.values[i][j] = amat[k++];
for( int i=0,k=0; i<3; ++i )
for( int j=0; j<3; ++j )
matrix.values[i][j] = amat[k++];
@@
-342,7
+342,6
@@
int MoveObj::process_buffer(VFrame *frame, int64_t start_position, double frame_
//printf("MoveObj::process_buffer %d %jd matrix=\n", __LINE__, start_position);
//matrix.dump();
//printf("MoveObj::process_buffer %d %jd matrix=\n", __LINE__, start_position);
//matrix.dump();
- affine->set_matrix(&matrix);
// iframe is always temp, if we get here
output->clear_frame();
affine->process(output, iframe, 0, AffineEngine::TRANSFORM,
// iframe is always temp, if we get here
output->clear_frame();
affine->process(output, iframe, 0, AffineEngine::TRANSFORM,