- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, the image is too low resolution for me to quite make out what your design looks like. Could you upload a higher resolution version (if you can't do it on this forum, upload it at a free image sharing site such as imgur.com) and post a couple of details about what output you are getting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i have updated the pic please check it suggest me the solution..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you intend it to be a 2x2 convolution matrix? to avoid half pixel shifts you need to do an odd number filter, like 3x3 or 5x5. But you have a x4 overall gain, so I guess you've got a very bright white output image?
You also restrict your image size to 300 wide.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
U r right thanx its help me a lot,but again when i am doing 3 by 3 convolution and taking 256 pixels image black output is coming.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you attach your design?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you are doing your filter, you are adding the pixel values but they are in uint8 format, so the sum can't get above 255. You have to make sure that the bit widths accommodate your sum to get large enough. ALSO you need to divide the result by your filter size. So if you are doing a 3x3 blur you should be adding the pixel values of the 9 pixels and then dividing the sum by 9.
In the attached simulink file, i simply did 3x3 blurring (as an average of pixel values) on the individual R,G,B channels. The blurring works if all your bitwidths are set correctly. For example the accumulator bitwidth is set to 16 instead of 8 (although 16 is far too much). Then I also have a gain block of 1/9 to average the sums. Also I'm just using the native simulink library, not dsp builder but the concepts remain.- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page