在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. JavaScript DOM事件对象的两个小练习 | 学习内容分享

    Event 对象 Event 对象代表事件的状态,比如事件在其中发生的元素.键盘按键的状态.鼠标的位置.鼠标按钮的状态. 事件通常与函数结合使用,函数不会在事件发生前被执行! 本文用于记录个人学习过程 ...

  2. codefoces 22E 图论

    有些题还得练练模拟的能力呀 这题一言难尽,他给的 图不是半连通子图呀,我崩溃了 要分好组,然后1给2连,2给3连,.....n给1连.. 具体看代码,我写的比较捞了吧.. #include<io ...

  3. SpringBoot入门简易教程

    使用SpringBoot来开发一个简单的restful api网关功能,目标:实现对SpringBoot的简单入门. 1. 创建SpringBoot项目 可以通过spring官网(https://st ...

  4. The second day of Crawler learning

    用BeatuifulSoup和Requests爬取猫途鹰网 服务器与本地的交换机制 我们每次浏览网页都是再向网页所在的服务器发送一个Request,然后服务器接受到Request后返回Response ...

  5. $vjudge$联赛专题训练三做题记录

    $A$ $B$ $C$ $D$ $E$ 总感觉做过的亚子,,,$QwQ$ 首先发现到达每个点所需要的操作一和操作二的次数都是可以求出来的?考虑先求出总移动数,然后按总移动数排序. 然后到达某点的方案数 ...

  6. $POJ$2976 $Dropping\ tests$ 01分数规划+贪心

    正解:01分数规划 解题报告: 传送门! 板子题鸭,,, 显然考虑变成$a[i]-mid\cdot b[i]$,显然无脑贪心下得选出最大的$k$个然后判断是否大于0就好(,,,这么弱智真的算贪心嘛$T ...

  7. Spring中常见的设计模式——策略模式

    策略模式(Strategy Pattern) 一.策略模式的应用场景 策略模式的应用场景如下: 系统中有很多类,而他们的区别仅仅在于行为不同. 一个系统需要动态的在集中算法中选择一种 二.用策略模式实 ...

  8. c++数字和字符之间的转化

    关于C++中数与字符之间的转化 在c++中我们经常遇到需要把一个数变成字符,或者把字符变为一个数,c++中没有直接的转化函数,故我们需要自己去写函数去转化,这里我将介绍两种比较简单的方法: 法一: s ...

  9. 通过例子学习C++(二)最小公倍数

    本文是通过例子学习C++的第二篇,通过这个例子可以快速入门c++相关的语法. 题目要求:输入两个整数,求其最小公倍数. 解答方法一:两个数的最小公倍数,是这两个数中的大数,或者是这2个数的倍数中的最小 ...

  10. ubuntu下报错Sub-process /usr/bin/dpkg returned an error code (1)的解决方法

    cd /var/lib/dpkg sudo mv info info.bak #即备份一个info sudo mkdir info #新建一个新的info目录 然后采用以下命令重装那些出错的软件包 s ...