Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to identify rectangles in a bitmap

how to identify rectangles in a bitmap

Scheduled Pinned Locked Moved C#
tutorialgraphicsquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    neodeaths
    wrote on last edited by
    #1

    hi i am have an image which i would like to identify all rectangular border. does anyone know anyone know how i can do this efficiently? an example of what i am trying to get like 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 2 2 2 2 2 2 2 0 0 2 0 0 0 0 1 2 0 0 2 0 0 0 0 0 2 0 0 2 2 2 2 2 2 2 0 0 0 0 0 0 0 1 0 0 where 1 and 2 are the same colour and 0 represents another colour so the rectangular border i am trying to get is the rectangle coordinate of the pixel which are marked 2

    A 1 Reply Last reply
    0
    • N neodeaths

      hi i am have an image which i would like to identify all rectangular border. does anyone know anyone know how i can do this efficiently? an example of what i am trying to get like 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 2 2 2 2 2 2 2 0 0 2 0 0 0 0 1 2 0 0 2 0 0 0 0 0 2 0 0 2 2 2 2 2 2 2 0 0 0 0 0 0 0 1 0 0 where 1 and 2 are the same colour and 0 represents another colour so the rectangular border i am trying to get is the rectangle coordinate of the pixel which are marked 2

      A Offline
      A Offline
      Afzaal Ahmad Zeeshan
      wrote on last edited by
      #2

      You want to work with pixels? Go deep, deep, deep into the low-level programming, because System.Drawing [^]won't help you out. Anyhow, how will you define a pixel to be 2, or 0, or a 1. Pixels vary in values, and even a slight different in their value would be indetectable by you, and software would provide you with a lot of unexpected results. First learn the basics, get to the intermediate level of programming then you can create an application of such logic.

      The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups