Difference between revisions of "Function:Divide"
From CUVI Wiki
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Divides pixel values of first image by corresponding pixels values from second image | Divides pixel values of first image by corresponding pixels values from second image | ||
===Function=== | ====Function==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus divide(CuviImage | CuviStatus divide(const CuviImage& src1, | ||
CuviImage | const CuviImage& src2, | ||
CuviImage | CuviImage& dst, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 19: | Line 21: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src1 | ||
| CuviImage | | const CuviImage& | ||
| Dividend Image | | Dividend Image | ||
|- | |- | ||
| | | src2 | ||
| CuviImage | | const CuviImage& | ||
| Divisor Image | | Divisor Image | ||
|- | |- | ||
| | | dst | ||
| CuviImage | | CuviImage& | ||
| Resultant Image | | Resultant Image | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
|} | |||
|} | |} | ||
===Image Type Support=== | ====Image Type Support==== | ||
{| | |||
|style="font-size:75%;"| | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 68: | Line 71: | ||
| 32fC3 | | 32fC3 | ||
| 32fC3 | | 32fC3 | ||
|} | |||
|} | |} | ||
====Code Example==== | |||
===Example=== | |||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviImage | CuviImage gimg1 = cuvi::io::loadImage(path); | ||
CuviImage | CuviImage gimg2 = cuvi::io::loadImage(path); | ||
CuviImage gout; | |||
//Divide | //Divide | ||
cuvi::arithmeticLogical::divide(gimg1,gimg2,gout); | CuviStatus s = cuvi::arithmeticLogical::divide(gimg1,gimg2,gout); | ||
if(s!=CUVI_SUCCESS) | |||
{ | |||
cout<<"Division Failed"<<endl<<"Status = "<<s<<endl; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 20:13, 18 October 2022
Divides pixel values of first image by corresponding pixels values from second image
Function
|
Parameters
|
Image Type Support
|
Code Example
|