Note that there are some explanatory texts on larger screens.

plurals
  1. PO3 classes (0, 1, 4) on Boost graph cut
    primarykey
    data
    text
    <p>I obtain strange results when I use the BGL boykov_kolmogorov_max_flow() function. I though I would see 2 classes (0-1 or anything else, but only 2!) but I often see three classes: 0, 1 and 4.</p> <p>For example, using the image below with</p> <ul> <li>source: middle pixel on left border</li> <li>sink: middle pixel on right border</li> <li>horizontal edge cost = 10 * e^(rightPixel / 50)</li> <li>vertical edge code = 0.1.</li> </ul> <p><img src="https://i.stack.imgur.com/L6VMa.png" alt="8 bits image"></p> <p>I obtain the following results:</p> <pre><code>444444444444400000000000000000 444444444444440000000000000000 444444444444440000000000000000 444444444444440000000000000000 444444444444444000000000000000 444444444444444000000000000000 444444444444444000000000000000 444444444444444000000000000000 444444444444444000000000000000 444444444444444000000000000000 444444444444444411000000000000 444444444444444444000000000000 444444444444444444000000000000 444444444444444444000000000000 444444444441111111000000000000 444444444440000000000000000000 444444444440000000000000000000 444444444440000000000000000000 444444444440000000000000000000 444444444444000000000000000000 444444444444000000000000000000 444444444444100000000000000000 444444444444110000000000000000 444444444444110000000000000000 444444444444411000000000000000 444444444444444400000000000000 444444444444444400000000000000 444444444444444400000000000000 444444444444444400000000000000 444444444444444400000000000000 </code></pre> <p>Can someone explain the real meaning of these classes? I'm quite sure 4 is the source class and 0 is the sink class, but what about 1? I found nothing in the documentation about that. I think it means a "not sure" horizontal zone, but why would it means that?!?</p> <p>Second question. Are the 1 reliable? Would it be possible to use them to find a smoother border like in the image below? The goal would be to choose one of the green pixel instead of the red one who are too far to the right. I mean, I know that I could use the 1 in this case to do it, but can I trust them to be there when I need them? :)</p> <p><img src="https://i.stack.imgur.com/osNQO.png" alt="Colored border"></p> <p>Thanks for your time.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload