Graph-cut and pairwise MRF












1












$begingroup$


I try to use graph-cut method but I got some trouble with it. I want to segment an image into foreground and background. For each pixel $x$, I got the probability that it belongs to the background $p(x|phi_b)$ and to the foreground $p(x|phi_f)$ by kernel density estimation (KDE). Here is the log-posterior :



$$ log p(mathcal{L}|x) = left( sum^N_{i=1} sum^N_{j=1} lambda(l_il_j + (1-l_i)(1-l_j)) right) + sum^N_{i=1} logleft( frac{p(x_i|phi_f)}{p(x_i|phi_b)} right) l_i $$



where $mathcal{L} = [l_1...L_N]$, $N$ is the number of pixel in the image.



If I understand, the first term is the pairwise cost, for smoothness and determine the weight on edges between a pixel and its neighbors. According to the equation, I put lambda as a weight on each edges.



The second term is the unary cost and determine the weight on edges between a pixel and the source and the sink. Here, the weight between a pixel and the source is the same that between the pixel and the sink ? Am I right ?



Thanks










share|cite|improve this question











$endgroup$

















    1












    $begingroup$


    I try to use graph-cut method but I got some trouble with it. I want to segment an image into foreground and background. For each pixel $x$, I got the probability that it belongs to the background $p(x|phi_b)$ and to the foreground $p(x|phi_f)$ by kernel density estimation (KDE). Here is the log-posterior :



    $$ log p(mathcal{L}|x) = left( sum^N_{i=1} sum^N_{j=1} lambda(l_il_j + (1-l_i)(1-l_j)) right) + sum^N_{i=1} logleft( frac{p(x_i|phi_f)}{p(x_i|phi_b)} right) l_i $$



    where $mathcal{L} = [l_1...L_N]$, $N$ is the number of pixel in the image.



    If I understand, the first term is the pairwise cost, for smoothness and determine the weight on edges between a pixel and its neighbors. According to the equation, I put lambda as a weight on each edges.



    The second term is the unary cost and determine the weight on edges between a pixel and the source and the sink. Here, the weight between a pixel and the source is the same that between the pixel and the sink ? Am I right ?



    Thanks










    share|cite|improve this question











    $endgroup$















      1












      1








      1





      $begingroup$


      I try to use graph-cut method but I got some trouble with it. I want to segment an image into foreground and background. For each pixel $x$, I got the probability that it belongs to the background $p(x|phi_b)$ and to the foreground $p(x|phi_f)$ by kernel density estimation (KDE). Here is the log-posterior :



      $$ log p(mathcal{L}|x) = left( sum^N_{i=1} sum^N_{j=1} lambda(l_il_j + (1-l_i)(1-l_j)) right) + sum^N_{i=1} logleft( frac{p(x_i|phi_f)}{p(x_i|phi_b)} right) l_i $$



      where $mathcal{L} = [l_1...L_N]$, $N$ is the number of pixel in the image.



      If I understand, the first term is the pairwise cost, for smoothness and determine the weight on edges between a pixel and its neighbors. According to the equation, I put lambda as a weight on each edges.



      The second term is the unary cost and determine the weight on edges between a pixel and the source and the sink. Here, the weight between a pixel and the source is the same that between the pixel and the sink ? Am I right ?



      Thanks










      share|cite|improve this question











      $endgroup$




      I try to use graph-cut method but I got some trouble with it. I want to segment an image into foreground and background. For each pixel $x$, I got the probability that it belongs to the background $p(x|phi_b)$ and to the foreground $p(x|phi_f)$ by kernel density estimation (KDE). Here is the log-posterior :



      $$ log p(mathcal{L}|x) = left( sum^N_{i=1} sum^N_{j=1} lambda(l_il_j + (1-l_i)(1-l_j)) right) + sum^N_{i=1} logleft( frac{p(x_i|phi_f)}{p(x_i|phi_b)} right) l_i $$



      where $mathcal{L} = [l_1...L_N]$, $N$ is the number of pixel in the image.



      If I understand, the first term is the pairwise cost, for smoothness and determine the weight on edges between a pixel and its neighbors. According to the equation, I put lambda as a weight on each edges.



      The second term is the unary cost and determine the weight on edges between a pixel and the source and the sink. Here, the weight between a pixel and the source is the same that between the pixel and the sink ? Am I right ?



      Thanks







      graph-theory computer-science image-processing computer-vision






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 11 '18 at 18:08







      mnchapel

















      asked Dec 11 '18 at 8:44









      mnchapelmnchapel

      162




      162






















          0






          active

          oldest

          votes











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3035072%2fgraph-cut-and-pairwise-mrf%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3035072%2fgraph-cut-and-pairwise-mrf%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Aardman Animations

          Are they similar matrix

          “minimization” problem in Euclidean space related to orthonormal basis