Counting bricks from image
-
Hi everyone, I have a small question, for my school project i need to make a program for counting brick in image. So I have a picture with nothing but bricks on it, and i need to count them, the idea i have is to use Sobel algorithm, blur, binaryzation and region search, something like that. Is is the right way to go, or is there any better one? Thank you all for your help!
-
Hi everyone, I have a small question, for my school project i need to make a program for counting brick in image. So I have a picture with nothing but bricks on it, and i need to count them, the idea i have is to use Sobel algorithm, blur, binaryzation and region search, something like that. Is is the right way to go, or is there any better one? Thank you all for your help!
I would say you have it spot on... filter the image and then apply a region counting algorithm. The filtering is relatively simple... but the region finding could be harder (I've never used/made one). If you get the original image down to just the outlines of the bricks (via the filters), then you could use a Monte-Carlo based search to look for borders surrounding each point. [I wish I had a school project as interesting as yours!]
Matthew Butler
-
I would say you have it spot on... filter the image and then apply a region counting algorithm. The filtering is relatively simple... but the region finding could be harder (I've never used/made one). If you get the original image down to just the outlines of the bricks (via the filters), then you could use a Monte-Carlo based search to look for borders surrounding each point. [I wish I had a school project as interesting as yours!]
Matthew Butler
-
Hmm ya all i need is some guidance where i can get this algorithms implemented in C#. Thnx for your reply.
Member 3897207 wrote:
all i need is some guidance where i can get this algorithms implemented in C#.
First, you ask for some advice on if your approach to the problem, which is fine. But now you respond to Mathew's advice saying you just want help on how to cheat to do your homework. I was going add a litte to his advice but now I won't and you'll probably not get any further help.
2 75 22 6
-
Member 3897207 wrote:
all i need is some guidance where i can get this algorithms implemented in C#.
First, you ask for some advice on if your approach to the problem, which is fine. But now you respond to Mathew's advice saying you just want help on how to cheat to do your homework. I was going add a litte to his advice but now I won't and you'll probably not get any further help.
2 75 22 6
Well what can i say...basically this came out wrong, because i found some algorithms, but they are written in java, so i wondered if there is any...ok...not just for this problem, but if there is any site with algorithms (general) where code is in C#. Well if i don't get any help any more...so be it. Thnx anyway at least for confirming that the approach is at least a bit correct.
-
Well what can i say...basically this came out wrong, because i found some algorithms, but they are written in java, so i wondered if there is any...ok...not just for this problem, but if there is any site with algorithms (general) where code is in C#. Well if i don't get any help any more...so be it. Thnx anyway at least for confirming that the approach is at least a bit correct.
C# is very similar to Java (C# partly originated from it). You should be able to translate the code with little hassle. If you get stuck, post your code, and so long as your question is reasonable, we'd be happy to help.
Mark Brock Click here to view my blog
-
Well what can i say...basically this came out wrong, because i found some algorithms, but they are written in java, so i wondered if there is any...ok...not just for this problem, but if there is any site with algorithms (general) where code is in C#. Well if i don't get any help any more...so be it. Thnx anyway at least for confirming that the approach is at least a bit correct.
Yes, to echo what Mark said. The way to approach us on this is to present the problem, describe what you've done to solve it, and ask why you're not getting the results you expect. Then you'll probably get some help. But to post like you're simply looking for a place to cut and paste your homework won't fly. We get plenty of queries like that and they're generally all told to take a hike, some less politely than others. One potential problem with the method you sketched is that the lines you get after you run the Sobel and threshold is they may contain gaps for one reason or another. You may need a way to look at the partial lines and fill in the blanks. Since the problem is fairly artificial, you have a lot of prior knowledge about what you're looking for.
2 75 22 6
-
Hi everyone, I have a small question, for my school project i need to make a program for counting brick in image. So I have a picture with nothing but bricks on it, and i need to count them, the idea i have is to use Sobel algorithm, blur, binaryzation and region search, something like that. Is is the right way to go, or is there any better one? Thank you all for your help!
-
Yes, to echo what Mark said. The way to approach us on this is to present the problem, describe what you've done to solve it, and ask why you're not getting the results you expect. Then you'll probably get some help. But to post like you're simply looking for a place to cut and paste your homework won't fly. We get plenty of queries like that and they're generally all told to take a hike, some less politely than others. One potential problem with the method you sketched is that the lines you get after you run the Sobel and threshold is they may contain gaps for one reason or another. You may need a way to look at the partial lines and fill in the blanks. Since the problem is fairly artificial, you have a lot of prior knowledge about what you're looking for.
2 75 22 6
Tim Craig wrote:
to post like you're simply looking for a place to cut and paste your homework won't fly
I ditto that Tim. I was going to give some input, but not now :rolleyes:
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon