Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/99.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
IOS从遮罩图像中提取输出图像_Ios_Image Processing_Swift3_Mask - Fatal编程技术网

IOS从遮罩图像中提取输出图像

IOS从遮罩图像中提取输出图像,ios,image-processing,swift3,mask,Ios,Image Processing,Swift3,Mask,我已经根据用户输入创建了一个图像掩码,结果包括前景和创建的掩码(混合) 我试图找到一种只返回蒙版图像的方法,但未能找到一种更改蒙版alpha值的方法。有人能帮忙吗?我想获得所选区域的最终图像 我正在使用的创建遮罩并返回遮罩图像的代码如下:经过不断的研究和测试,我使用getForeground:andMask方法将目标分割为两组值。然后,我反转遮罩,并将结果图像和反转遮罩添加到背景色清晰的子视图中

我已经根据用户输入创建了一个图像掩码,结果包括前景和创建的掩码(混合)

我试图找到一种只返回蒙版图像的方法,但未能找到一种更改蒙版alpha值的方法。有人能帮忙吗?我想获得所选区域的最终图像


我正在使用的创建遮罩并返回遮罩图像的代码如下:

经过不断的研究和测试,我使用
getForeground:andMask
方法将目标分割为两组值。然后,我反转遮罩,并将结果图像和反转遮罩添加到背景色清晰的
子视图中