小编Ada*_*amo的帖子

Java和haarcascade面部和嘴部检测 - 嘴巴作为鼻子

今天我开始测试在Java和OpenCv中检测微笑的项目.为了识别面部和嘴部项目使用haarcascade_frontalface_alt和haarcascade_mcs_mouth但我不明白为什么在某些原因项目检测鼻子作为一个嘴.我有两种方法:

private ArrayList<Mat> detectMouth(String filename) {
    int i = 0;
    ArrayList<Mat> mouths = new ArrayList<Mat>();
    // reading image in grayscale from the given path
    image = Highgui.imread(filename, Highgui.CV_LOAD_IMAGE_GRAYSCALE);
    MatOfRect faceDetections = new MatOfRect();
    // detecting face(s) on given image and saving them to MatofRect object
    faceDetector.detectMultiScale(image, faceDetections);
    System.out.println(String.format("Detected %s faces", faceDetections.toArray().length));
    MatOfRect mouthDetections = new MatOfRect();
    // detecting mouth(s) on given image and saving them to MatOfRect object
    mouthDetector.detectMultiScale(image, mouthDetections);
    System.out.println(String.format("Detected %s mouths", mouthDetections.toArray().length));
    for (Rect face : faceDetections.toArray()) { …
Run Code Online (Sandbox Code Playgroud)

java opencv face-detection haar-classifier

14
推荐指数
1
解决办法
2215
查看次数

Bitbucket管道 - 将一个分支合并到另一个分支的可能性

我有一个包含两个分支的存储库:masterDev,我想以这样的方式配置pipline,当我将代码推送到Dev分支并且代码构建成功时,Dev被合并到master.不幸的是,我无法在bitbucket piplines docs中找到有关合并的任何信息.

那是我的yml文件:

pipelines:
  branches:
    Dev:
      - step:
          script:
            - ant deployCodeCheckOnly -Dsf.username=$SF_USERNAME -Dsf.password=$SF_PASSWORD
Run Code Online (Sandbox Code Playgroud)

那个案子可以帮助我吗?如果有可能吗?

- 编辑

我尝试将脚本更改为sugest:

pipelines:
  branches:
    Dev:
      - step:
          script:
            - ant deployCodeCheckOnly -Dsf.username=$SF_USERNAME -Dsf.password=$SF_PASSWORD
            - git remote -v
            - git fetch
            - git checkout master
            - git merge Dev
            - git push -v --tags origin master:master
Run Code Online (Sandbox Code Playgroud)

结果:

git remote -v
+ git remote -v
origin  git@bitbucket.org:repository/project.git (fetch)
origin  git@bitbucket.org:repository/project.git (push)

git fetch origin …
Run Code Online (Sandbox Code Playgroud)

bitbucket bitbucket-pipelines

6
推荐指数
2
解决办法
3024
查看次数