File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ module OpenCV.Core.ArrayOps
17
17
, matSubtract
18
18
, matAddWeighted
19
19
, matScaleAdd
20
+ , matMax
20
21
-- ** Bitwise operations
21
22
-- $bitwise_intro
22
23
, bitwiseNot
@@ -277,6 +278,23 @@ matScaleAdd src1 scale src2 = unsafeWrapException $ do
277
278
where
278
279
c'scale = realToFrac scale
279
280
281
+ matMax
282
+ :: Mat shape channels depth -- ^
283
+ -> Mat shape channels depth
284
+ -> Mat shape channels depth
285
+ matMax src1 src2 = unsafePerformIO $ do
286
+ dst <- newEmptyMat
287
+ withPtr dst $ \ dstPtr ->
288
+ withPtr src1 $ \ src1Ptr ->
289
+ withPtr src2 $ \ src2Ptr ->
290
+ [C. block | void {
291
+ cv::max
292
+ ( *$(Mat * src1Ptr)
293
+ , *$(Mat * src2Ptr)
294
+ , *$(Mat * dstPtr)
295
+ );
296
+ }|]
297
+ pure $ unsafeCoerceMat dst
280
298
281
299
--------------------------------------------------------------------------------
282
300
-- Per element bitwise operations
You can’t perform that action at this time.
0 commit comments