3 kyu

Identify frames in an image

Description
Loading description...
Image Processing
Algorithms
  • Please sign in or sign up to leave a comment.
  • danielsedoff Avatar

    The image is unavailable, so there is no example now. First I was amazed at the input image. But five minutes later I understood it was not the actual example but the 'unavailable' plug.

  • kefniark Avatar

    had fun with this kata ^^

  • ZED.CWT Avatar

    Approved.

    • Added random tests.
    • Updated description.
    • Fixed bug in complete solution.
  • docgunthrop Avatar

    In the initial solution, the bc color variable is defined twice.

    var bc = [0,0,0]
    .../* other colors defined */
    var bc = [0,0,255]
    

    Other than that, what issues are you having with generating random tests?

    • docgunthrop Avatar

      After some testing, it turns out this kata accepts some invalid solutions (some solutions with bugs still passed all the tests). Random tests are strongly encouraged for this kata. (Even in beta, running only 4 tests is far too few, especially for a kata at this kyu rank).

      One other suggestion is a slight modification to the description, specifically:

      Must be hollow. - Therefore, the green square is not considered a frame (and by extension every pixel alone is not a frame)

      The wording seemed a little ambiguous, initially. (The green square in the image isn't the best example; a 3x3 solid green square would paint a better picture.) Perhaps you can add something like:

      Complete frames where all internal cells have colors that are identical to the color of the frame are NOT valid frames. In other words, if a frame is a solid block consisting of only one color, then it is not valid.

      Other than that, this is a great kata.

    • ZED.CWT Avatar
      • Fixed variable bc.
      • Updated description.
      • Added random tests.
      Question marked resolved by ZED.CWT 8 years ago
    • kkolberg Avatar

      PNG or Jpeg's are not showing up in the instructions.

  • MichaelSel Avatar

    I would love to get some help generating random tests please.