Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.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
Matlab 眼睛和面部跟踪 你有问题吗?唱歌(github也不是) if ~isempty(bbox) % Find corner points inside the detected region. points = detectMi_Matlab - Fatal编程技术网

Matlab 眼睛和面部跟踪 你有问题吗?唱歌(github也不是) if ~isempty(bbox) % Find corner points inside the detected region. points = detectMi

Matlab 眼睛和面部跟踪 你有问题吗?唱歌(github也不是) if ~isempty(bbox) % Find corner points inside the detected region. points = detectMi,matlab,Matlab,眼睛和面部跟踪 你有问题吗?唱歌(github也不是) if ~isempty(bbox) % Find corner points inside the detected region. points = detectMinEigenFeatures(videoFrameGray, 'ROI', bbox(1, :)); xyPoints = points.Location; numPts = size(xyPoints,1);

眼睛和面部跟踪
你有问题吗?唱歌(github也不是)
if ~isempty(bbox)
        % Find corner points inside the detected region.
        points = detectMinEigenFeatures(videoFrameGray, 'ROI', bbox(1, :));
        xyPoints = points.Location;
        numPts = size(xyPoints,1);
        release(pointTracker);
        initialize(pointTracker, xyPoints, videoFrameGray);
        oldPoints = xyPoints;
        bboxPoints = bbox2points(bbox(1, :));  
        bboxPolygon = reshape(bboxPoints', 1, []);
        videoFrame = insertShape(videoFrame, 'Polygon', bboxPolygon, 'LineWidth', 3);
        videoFrame = insertShape(videoFrame, 'circle', [(bbox(1)+bbox(3))/2  (bbox(2)+bbox(4))/2 10], 'LineWidth', 3);
        videoFrame = insertMarker(videoFrame, xyPoints, '+', 'Color', 'white');
        videoFrame = insertMarker(videoFrame, [mean(bboxPoints(2:2:8)) mean(bboxPoints(1:2:7))], 'o', 'Color', 'red');
    end

else
    % Tracking mode.
    [xyPoints, isFound] = step(pointTracker, videoFrameGray);
    visiblePoints = xyPoints(isFound, :);
    oldInliers = oldPoints(isFound, :);

    numPts = size(visiblePoints, 1);       

    if numPts >= 10


        [xform, oldInliers, visiblePoints] = estimateGeometricTransform(...
            oldInliers, visiblePoints, 'similarity', 'MaxDistance', 4);            

        % Apply the transformation to the bounding box.
        bboxPoints = transformPointsForward(xform, bboxPoints);

        % Convert the box corners into the [x1 y1 x2 y2 x3 y3 x4 y4] 
        % format required by insertShape.
        bboxPolygon = reshape(bboxPoints', 1, []);            

        % Display a bounding box around the face being tracked.
        videoFrame = insertShape(videoFrame, 'Polygon', bboxPolygon, 'LineWidth', 3);

        % Display tracked points.
        videoFrame = insertMarker(videoFrame, visiblePoints, '+', 'Color', 'white');
        videoFrame = insertMarker(videoFrame, [mean(bboxPoints(2:2:8)) mean(bboxPoints(1:2:7))], 'o', 'Color', 'red');

        % Reset the points.
        oldPoints = visiblePoints;
        setPoints(pointTracker, oldPoints);
    end

end