mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 18:13:13 +08:00
Fix some typos
This commit is contained in:
parent
373160ce00
commit
af997529a1
@ -210,12 +210,12 @@ Explanation
|
|||||||
@code{.cpp}
|
@code{.cpp}
|
||||||
image2 = image - Scalar::all(i)
|
image2 = image - Scalar::all(i)
|
||||||
@endcode
|
@endcode
|
||||||
So, **image2** is the substraction of **image** and **Scalar::all(i)**. In fact, what happens
|
So, **image2** is the subtraction of **image** and **Scalar::all(i)**. In fact, what happens
|
||||||
here is that every pixel of **image2** will be the result of substracting every pixel of
|
here is that every pixel of **image2** will be the result of subtracting every pixel of
|
||||||
**image** minus the value of **i** (remember that for each pixel we are considering three values
|
**image** minus the value of **i** (remember that for each pixel we are considering three values
|
||||||
such as R, G and B, so each of them will be affected)
|
such as R, G and B, so each of them will be affected)
|
||||||
|
|
||||||
Also remember that the substraction operation *always* performs internally a **saturate**
|
Also remember that the subtraction operation *always* performs internally a **saturate**
|
||||||
operation, which means that the result obtained will always be inside the allowed range (no
|
operation, which means that the result obtained will always be inside the allowed range (no
|
||||||
negative and between 0 and 255 for our example).
|
negative and between 0 and 255 for our example).
|
||||||
|
|
||||||
|
@ -502,7 +502,7 @@ typedef double v1f64 __attribute__ ((vector_size(8), aligned(8)));
|
|||||||
(v4u32)__builtin_msa_pckev_w((v4i32)__builtin_msa_sat_u_d((v2u64)__e, 31), (v4i32)__builtin_msa_sat_u_d((v2u64)__d, 31)); \
|
(v4u32)__builtin_msa_pckev_w((v4i32)__builtin_msa_sat_u_d((v2u64)__e, 31), (v4i32)__builtin_msa_sat_u_d((v2u64)__d, 31)); \
|
||||||
})
|
})
|
||||||
|
|
||||||
/* Minimum values between corresponding elements in the two vectors are written to teh returned vector. */
|
/* Minimum values between corresponding elements in the two vectors are written to the returned vector. */
|
||||||
#define msa_minq_s8(__a, __b) (__builtin_msa_min_s_b(__a, __b))
|
#define msa_minq_s8(__a, __b) (__builtin_msa_min_s_b(__a, __b))
|
||||||
#define msa_minq_s16(__a, __b) (__builtin_msa_min_s_h(__a, __b))
|
#define msa_minq_s16(__a, __b) (__builtin_msa_min_s_h(__a, __b))
|
||||||
#define msa_minq_s32(__a, __b) (__builtin_msa_min_s_w(__a, __b))
|
#define msa_minq_s32(__a, __b) (__builtin_msa_min_s_w(__a, __b))
|
||||||
@ -514,7 +514,7 @@ typedef double v1f64 __attribute__ ((vector_size(8), aligned(8)));
|
|||||||
#define msa_minq_f32(__a, __b) (__builtin_msa_fmin_w(__a, __b))
|
#define msa_minq_f32(__a, __b) (__builtin_msa_fmin_w(__a, __b))
|
||||||
#define msa_minq_f64(__a, __b) (__builtin_msa_fmin_d(__a, __b))
|
#define msa_minq_f64(__a, __b) (__builtin_msa_fmin_d(__a, __b))
|
||||||
|
|
||||||
/* Maximum values between corresponding elements in the two vectors are written to teh returned vector. */
|
/* Maximum values between corresponding elements in the two vectors are written to the returned vector. */
|
||||||
#define msa_maxq_s8(__a, __b) (__builtin_msa_max_s_b(__a, __b))
|
#define msa_maxq_s8(__a, __b) (__builtin_msa_max_s_b(__a, __b))
|
||||||
#define msa_maxq_s16(__a, __b) (__builtin_msa_max_s_h(__a, __b))
|
#define msa_maxq_s16(__a, __b) (__builtin_msa_max_s_h(__a, __b))
|
||||||
#define msa_maxq_s32(__a, __b) (__builtin_msa_max_s_w(__a, __b))
|
#define msa_maxq_s32(__a, __b) (__builtin_msa_max_s_w(__a, __b))
|
||||||
|
@ -82,7 +82,7 @@ void CV_WatershedTest::run( int /* start_from */)
|
|||||||
Point* p = (Point*)cvGetSeqElem(cnts, 0);
|
Point* p = (Point*)cvGetSeqElem(cnts, 0);
|
||||||
|
|
||||||
//expected image was added with 1 in order to save to png
|
//expected image was added with 1 in order to save to png
|
||||||
//so now we substract 1 to get real color
|
//so now we subtract 1 to get real color
|
||||||
if(!exp.empty())
|
if(!exp.empty())
|
||||||
colors.push_back(exp.ptr(p->y)[p->x] - 1);
|
colors.push_back(exp.ptr(p->y)[p->x] - 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user