yuandong-tian / Document-Rectification--CVPR11-

Matlab codes for Rectification and 3D Reconstruction of Curved Document Images (CVPR 11)
21 stars 14 forks source link

bbox error in matlab #1

Open kootsoop opened 7 years ago

kootsoop commented 7 years ago

Taken from: http://dsp.stackexchange.com/questions/36934/bbox-error-in-matlab

I am trying to run this code: https://github.com/yuandong-tian/Document-Rectification--CVPR11-

It works fine for the images already bundled with the code (in "forpublish" directory). However it fails when I try to run it with my own image. To test it with my own image (15.jpg), I put the image in the forpublish directory and I edit line 13 to "for i = 15" in runme.m .

I'm getting this error:

deal with image = 15
??? Reference to non-existent field 'bbox'.

Error in ==> rectify_image_2_tracing at 69
        [r.trajsUpper, r.trajsLower, r.trajsAll, r.trajsSigma, ...

Error in ==> runme at 36
    rs_new2{i} = rectify_image_2_tracing(img, rs_new2{i});

Error in ==> run at 57
          evalin('caller', [s ';']);

What changes do I have to do to run it on my own images?

runme.m has this comment but I'm confused on what to do:

% rs_new2{i}.bbox and rs_new2{i}.pts are manually labeled.
% (rs_new2{i}.seeds can be traced from rs_new2{i}.pts using the )

I guess the relevant part is:

rs.bbox = [20, 15, 628, 480];
%rs{i}.bbox = bboxes(i, ;
%    rs{i}.p1 = p1(i, :);
%    rs{i}.p2 = p2(i, :);
%    rs{i}.bUseP = true;
rs.bUseP = false;

To run it, edit download.sh and correct the typo from "intermediate" to "intemediate" in lines 3 and 4. Then execute runme.m .

yuandong-tian commented 6 years ago

@kootsoop Ok, you need to specify the text region (and provide a bbox) for your new image.

sunnyYaSky commented 6 years ago

I want to know how to get the text region and the .mat files ,thanks

ygean commented 4 years ago

@kootsoop @sunnyYaSky Can you share two .mat files? the link is invalid now!

Jiakui commented 4 years ago

@yuandong-tian can you update the link for the two .mat files? the link is invalid now!

TiffanyXYf commented 3 years ago

@zhouyuangan Have you got the .mat files?

ygean commented 3 years ago

No, there's no response from author.

---Original--- From: "TiffanyXYf"<notifications@github.com> Date: Thu, Jan 14, 2021 11:16 AM To: "yuandong-tian/Document-Rectification--CVPR11-"<Document-Rectification--CVPR11-@noreply.github.com>; Cc: "Yg Zhou"<1401499346@qq.com>;"Mention"<mention@noreply.github.com>; Subject: Re: [yuandong-tian/Document-Rectification--CVPR11-] bbox error in matlab (#1)

@zhouyuangan Have you got the .mat files?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.