在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. 数据预处理以及探索性分析(EDA)

    1.根据某个列进行groupby,判断是否存在重复列. # Count the unique variables (if we got different weight values, # for e ...

  2. asp.net core 3.x Endpoint终结点路由1-基本介绍和使用

    前言 我是从.net 4.5直接跳到.net core 3.x的,感觉asp.net这套东西最初是从4.5中的owin形成的.目前官方文档重点是讲路由,没有特别说明与传统路由的区别,本篇主要介绍终结点 ...

  3. DEVOPS技术实践_14:使用docker部署jenkins

    一 基础环境准备 [root@node6 ~]# cat /etc/redhat-release CentOS Linux release (Core) [root@node6 ~]# yum -y ...

  4. 网络知识02:TCP/IP概述

    一  DOD模型 传输控制协议IRI特网协议(TCP/IP)组是由美国国防部(DOD)所创建的,主要用来确保数据的完整性及在毁灭性战争中保持通信 是由一组不同功能的协议组合在一起的协议簇 利用一组协议 ...

  5. 如何学习Java基础

    Java是用于软件开发的最流行的编程语言,无论做自动化测试或者测试开发,Java依然是最重要的选项之一. 为什么要学习Java? Java很容易学习 Java是通用的,面向对象的,高性能,解释型,安全 ...

  6. Ubuntu 18.04安装搜狗拼音

    首先安装fcitx 一.检测是否安装fcitx 首先检测是否有fcitx,因为搜狗拼音依赖fcitx > fcitx 提示: 程序“fcitx”尚未安装. 您可以使用以下命令安装: > s ...

  7. Google 开源的 Python 命令行库:深入 fire(二)

    作者:HelloGitHub-Prodesire HelloGitHub 的<讲解开源项目>系列,项目地址:https://github.com/HelloGitHub-Team/Arti ...

  8. Docker日常常用命令汇总

    一.使用docker镜像/容器 (1)创建容器,且进入命令台 docker run --name 容器名 -i -t ubuntu /bin/bash (2)查看/容器 docker ps #查看正在 ...

  9. Leetcode1296划分数组为连续数字的集合

    解法1: 最暴力的方法,存每个数字出现的次数,排序之后,扫一遍,对于每个数字,看它后面连续的k-1个是否都存在. 耗时:404ms class Solution { public: bool isPo ...

  10. mysql索引最佳实践

    索引最佳实践使用的表CREATE TABLE `employees` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `name` varchar(24) NOT ...