在windows 10+visual studio环境下运行SelectiveSearchCodeIJCV中的demo.m难免会出现下列错误

-----------------------

if(~exist('mexFelzenSegmentIndex','var'))

-----------------------

错误使用 CountVisualWordsIndex (line 21)
First two input arguments should have the same 2D dimension

出错 BlobStructColourHist

出错 Image2HierarchicalGrouping (line 42)
[colourHist blobSizes] = BlobStructColourHist(blobIndIm, colourIm);

出错 demo (line 61)
[boxes blobIndIm blobBoxes hierarchy] = Image2HierarchicalGrouping(im, sigma, k, minSize, colorType,

simFunctionHandles);

原因是:Dependencies/FelzenSegment/mexFelzenSegmentIndex.cpp

行149:int* dims = (int*) mxGetDimensions(input[0]);

中int的问题。

方法一:

把demo.m中mex  Dependencies/FelzenSegment/mexFelzenSegmentIndex.cpp -output mexFelzenSegmentIndex;

改为

mex -compatibleArrayDims Dependencies/FelzenSegment/mexFelzenSegmentIndex.cpp -output mexFelzenSegmentIndex;

因为在 mex -compatibleArrayDims下mwSize才等于C中的int。

方法二:

直接将

int* dims = (int*) mxGetDimensions(input[0]);

改为跨平台使用的数据类型mwSize

mwSize* dims = (mwSize*) mxGetDimensions(input[0]);

SelectiveSearchCodeIJCV遇到First two input arguments should have the same 2D dimension的更多相关文章

  1. Matlab无法打开M文件的错误( Undefined function or method 'uiopen' for input arguments of type 'char)

    错误提示: Undefined function or method 'uiopen' for input arguments of type'char 解决方案: 运行命令 restoredefau ...

  2. JVM Input Arguments Lookup (JMX)(转)

    JVM Input Arguments Lookup (JMX) Maps JVM input arguments -- but not main arguments -- using JMX to ...

  3. Undefined function or method 'deploywhich' for input arguments of type 'char'

    在进行matlab和java混合编程的时候.由matlab打包,把m文件转换为jar文件.供java调用.有时在Tomcat中调用此类jar类会出现如题或者以下的错误: ??? Error using ...

  4. [转载]Java 8 日期&时间 API

    Java 8 日期和时间 声明 本文转自http://www.journaldev.com/2800/java-8-date-localdate-localdatetime-instant,以mark ...

  5. 以前写的一段aop,远程接口调用的日志。

    using System;using System.Collections.Generic;using System.Linq;using System.Text; using Microsoft.P ...

  6. Beennan的内嵌汇编指导(译)Brennan's Guide to Inline Assembly

    注:写在前面,这是一篇翻译文章,本人的英文水平很有限,但内嵌汇编是学习操作系统不可少的知识,本人也常去查看这方面的内容,本文是在做mit的jos实验中的一篇关于内嵌汇编的介绍.关于常用的内嵌汇编(AT ...

  7. Codility NumberSolitaire Solution

    1.题目: A game for one player is played on a board consisting of N consecutive squares, numbered from ...

  8. codility flags solution

    How to solve this HARD issue 1. Problem: A non-empty zero-indexed array A consisting of N integers i ...

  9. Max double slice sum 的解法

    1. 上题目: Task description A non-empty zero-indexed array A consisting of N integers is given. A tripl ...

随机推荐

  1. Integer类入门学习

    Integer类 它是一个类,是 int 基本数据类型的封装类. 基本API Integer 类和 int 的区别 Integer 是 int 包装类,int 是八大基本数据类型之一(byte,sho ...

  2. K:缓存数据库双写数据一致性方案

    对于缓存和数据库双写,其存在着数据一致性的问题.对于数据一致性要求较高的业务场景,我们通常会选择使用分布式事务(2pc.paxos等)来保证缓存与数据库之间的数据强一致性,但分布式事务的复杂性与对资源 ...

  3. 我的 2019 年 Python 文章榜单

    现在是 2020 年的第一天,我相信从昨天开始,各位的信息流里肯定充斥了各式各样的年度盘点/回顾/总结/记录之类的内容.虽然来得稍晚了,但我还是想给诸位送上这一篇文章. 我将在本文中列出自己于 201 ...

  4. beta week 1/2 Scrum立会报告+燃尽图 01

    此作业要求参见:https://edu.cnblogs.com/campus/nenu/2019fall/homework/9911 git地址:https://e.coding.net/Eustia ...

  5. Mysql 最全查询语句

    基本查询语句及语法: select distinct from where group by having limit 一.单表查询 前期表与数据准备: # 创建一张部门表 create table ...

  6. c++ python 交互之 swig

    c++ python 交互之 swig 工作中准备用python 作为脚本语言来实现一些工作于是就研究 可以和c++ 交互的脚本语言 本来一开始用的lua 但是 lua本身API接口很少 要么自己需要 ...

  7. jib-maven-plugin构建镜像

    序言 在本次期末设计当中,应为需要做部署脚本,我们采用的是dockerfile+docker-compose的部署方式,这种方式对vue项目是没有问题的,因为vue下载依赖与打包是分离开来的,即使修改 ...

  8. Linux上查找最大文件的 3 种方法

    有时候我们在系统上安装了数十个应用程序,随着使用时间的推移,许多文件变得越来越大,从而导致磁盘空间越来越小.那么问题来了,如何找到系统上这些大文件,然后进行一番磁盘空间清理呢,这篇文章就此介绍几种查找 ...

  9. python专题我对json的日常操作

    一前言 本篇文章将会阐述对json的日常操作,如何读取json文件,将json文件转为字典:如何将字典转为json,将字典写入文件等: 二 josn数据格式简要说明 json对于初学者可以理解是一种数 ...

  10. Docker入门之快速安装和卸载使用Centos7

    一.检查内核版本 注意:Docker要求操作系统必须是64位,如果使用的Centos内核版本为3.10以上 执行命令:uname  -r 二.安装依赖软件包 执行命令:yum install -y y ...