WIP: implement module artwork, adaptive inspector, ordered CMS and local mosaic; host validation pending
这个提交包含在:
1 父节点
3452f2344f
当前提交
4b73db8a17
57 个文件已更改
+631
-38
没有与搜索条件相匹配的文件
@@ -17,6 +17,11 @@
|
||||
VNImageRequestHandler *handler=[[VNImageRequestHandler alloc]initWithCGImage:cg orientation:kCGImagePropertyOrientationUp options:@{}];CGImageRelease(cg);
|
||||
if([handler performRequests:@[request] error:nil])for(VNFaceObservation *face in request.results){
|
||||
if(entries.size()>64||face.confidence<.5||!face.landmarks.faceContour.pointCount)continue;CGRect box=face.boundingBox;if(box.size.width<.015||box.size.height<.015)continue;
|
||||
// Privacy coverage includes eyes, brows and mouth. Skin's feature holes must
|
||||
// never punch through the mosaic. A padded rectangle covers the full face.
|
||||
DYToolMaskEntry privacy{};privacy.section=-102;privacy.mask.parameters=dyDefaultMaskParameters();
|
||||
privacy.mask.parameters.kind=DYMaskRectangle;privacy.mask.parameters.centerX=CGRectGetMidX(box);privacy.mask.parameters.centerY=1-CGRectGetMidY(box);
|
||||
privacy.mask.parameters.width=box.size.width*1.2;privacy.mask.parameters.height=box.size.height*1.25;privacy.mask.parameters.feather=0;entries.push_back(privacy);
|
||||
DYToolMaskEntry support{};support.section=-100;support.mask.parameters=dyDefaultMaskParameters();auto &p=support.mask.parameters;p.kind=DYMaskBezier;p.centerX=CGRectGetMidX(box);p.centerY=1-CGRectGetMidY(box);p.width=box.size.width;p.height=box.size.height;p.feather=.1;
|
||||
auto &path=support.mask.path;VNFaceLandmarkRegion2D *contour=face.landmarks.faceContour;
|
||||
for(NSUInteger i=0;i<contour.pointCount;i++){CGPoint q=contour.normalizedPoints[i];path.x[path.count]=q.x-.5;path.y[path.count]=.5-q.y;path.count++;}
|
||||
|
||||
在新工单中引用
屏蔽一个用户