如何使用Matlab可视化LabelMe数据库

时间:2017-01-12 22:53:20

标签: database image matlab

可以从http://www.cs.toronto.edu/~norouzi/research/mlh/data/LabelMe_gist.mat

下载LabelMe数据库

但是,还有另一个链接http://labelme.csail.mit.edu/Release3.0/ 该网页有一个工具箱,但我找不到任何要下载的数据库。所以,我想知道我是否可以使用具有以下字段的LabelMe_gist.mat。字段names包含图像的标签,img可能包含图像。如何显示培训和测试图像?我试过了

  
    

im = imread(img)     使用imread> parse_inputs时出错(第486行)     filename或url参数必须是字符串。

  

imread错误(第336行) [filename,fmt_s,extraArgs,msg] = parse_inputs(varargin {:});

但肯定不是这样的。请帮忙

load LabelMe_gist.mat;
load('LabelMe_gist.mat', 'img')

picture

1 个答案:

答案 0 :(得分:0)

由于我们从您的帖子中不知道这是什么类型的数据,所以我继续下载并下载它。事实证明,img是22019张大小为32x32(RGB)的图像的集合。这就是32 x 32 x 3 x 22019i变量的原因。因此,imshow(img(:,:,:,i));图像可通过for iImage = 1:size(img,4) figure(1);clf; imshow(img(:,:,:,iImage)); drawnow; end

访问

以下是所有这些动画(按Ctrl + C中断):

Option Explicit
Sub impOutlookTable()
' point to the desired email
Const strMail As String = "xxx@xxxxx.com"
Dim oApp As Outlook.Application
Dim oMapi As Outlook.MAPIFolder
Dim oMail As Outlook.MailItem

On Error Resume Next
Set oApp = GetObject(, "OUTLOOK.APPLICATION")
    If (oApp Is Nothing) Then Set oApp = CreateObject("OUTLOOK.APPLICATION")
On Error GoTo 0

Set oMapi = oApp.GetNamespace("MAPI").Folders(strMail).Folders("Inbox").Folders("AMEC-DCC -DS- TRANSMITTAL")
Set oMail = oMapi.Items(oMapi.Items.Count)

' get html table from email object
Dim oHTML As MSHTML.HTMLDocument: Set oHTML = New MSHTML.HTMLDocument
Dim oElColl As MSHTML.IHTMLElementCollection
With oHTML
    .Body.innerHTML = oMail.HTMLBody
    Set oElColl = .getElementsByTagName("table")
End With

'import in Excel
Dim x As Long, y As Long

For x = 0 To oElColl(0).rows.Length - 1
    For y = 0 To oElColl(0).rows(x).Cells.Length - 1
        Range("A1").Offset(x, y).Value = oElColl(0).rows(x).Cells(y).innerText
    Next y
Next x

Set oApp = Nothing
Set oMapi = Nothing
Set oMail = Nothing
Set oHTML = Nothing
Set oElColl = Nothing
End Sub