question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it a bug ? or just my understanding is wrong ?

See original GitHub issue

In synthgen.py filter() method.

@staticmethod
def filter(seg,area,label):
    """
    Apply the filter.
    The final list is ranked by area.
    """
    good = label[area > TextRegions.minArea]
    area = area[area > TextRegions.minArea]
    filt,R = [],[]
    for idx,i in enumerate(good):
        mask = seg==i
        xs,ys = np.where(mask)

        coords = np.c_[xs,ys].astype('float32')
        rect = cv2.minAreaRect(coords)          
        box = np.array(cv2.cv.BoxPoints(rect))
        h,w,rot = TextRegions.get_hw(box,return_rot=True)

        f = (h > TextRegions.minHeight 
            and w > TextRegions.minWidth
            and TextRegions.minAspect < w/h < TextRegions.maxAspect
            and area[idx]/w*h > TextRegions.pArea)
        filt.append(f)
        R.append(rot)

` when it used cv2.minAreaRect(coords) , I think the coordinates should be the form of (index in width, index in height). But coords is get by using np.where(mask), so the coords actually is (index in height, index in width). So is this a bug ? And I just find the box four points can’t encase the segment correctly? Or is it just ok or my understanding wrong ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

4reactions
ravan786commented, Aug 31, 2021

@woans0104 yes. It was due to pygame version. I switched to pygame 1.9.6 and this got resolved

0reactions
JooYoungJangcommented, Feb 23, 2022

I solved it with using python 3.8.8 & pygame 2.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it a Bug or an Error? « Barr Code - Embedded Gurus
The simple case is bug can be at any place, sometimes even in designs itself, most people love to call it bug beacuse...
Read more >
Errors vs. Bugs and the End of Stupidity - celandine13
Once you start to think of mistakes as deterministic rather than random, as caused by "bugs" (incorrect understanding or incorrect procedures) ...
Read more >
What is a bug (computer bug)? - TechTarget
This is a bug that arises when there is miscommunication between programmers. One example is when there are differences between the product documentation...
Read more >
Is this Application Insight / Azure Functions Bug? or My ...
First I have written Azure function without try-catch block so It was showing correct status/Information in Monitor section and application ...
Read more >
Debugging - you're doing it wrong. 10 techniques to find a bug ...
That's why in the article I'm going to tell you about my favorite approaches to finding bugs in the code. Table of contents....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found