Click here to Skip to main content
15,889,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to know no message in WindowProc callback function? Pin
Richard MacCutchan2-Apr-14 21:32
mveRichard MacCutchan2-Apr-14 21:32 
QuestionImage processing discussion forum? Pin
Vaclav_31-Mar-14 8:49
Vaclav_31-Mar-14 8:49 
AnswerRe: Image processing discussion forum? Pin
SoMad31-Mar-14 9:55
professionalSoMad31-Mar-14 9:55 
AnswerRe: Image processing discussion forum? Pin
Chris Losinger31-Mar-14 10:37
professionalChris Losinger31-Mar-14 10:37 
AnswerRe: Image processing discussion forum? Pin
leon de boer1-Apr-14 5:21
leon de boer1-Apr-14 5:21 
GeneralRe: Image processing discussion forum? Pin
Vaclav_4-Apr-14 3:50
Vaclav_4-Apr-14 3:50 
GeneralRe: Image processing discussion forum - CCL "trace" issue ?? Pin
Vaclav_4-Apr-14 4:50
Vaclav_4-Apr-14 4:50 
GeneralRe: Image processing discussion forum - CCL "trace" issue ?? Pin
leon de boer13-Apr-14 3:17
leon de boer13-Apr-14 3:17 
It's not a program issue it's a required structural issue of the raster process. You must maintain a one pixel border of background color around the image to vectorize it is covered in the reference paper. It is called a guard to stop the vectorize process going outside the area so if we use G for guard pixels and U for user bitmap image it must look like this

GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
GUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUG
GUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUG
GUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUG
GUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUG
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG

So hence your image must be placed starting at 1,1 and the guard pixels (background color) must be in place and you start the vectorizer at 1,1. The vectorize process searches one pixel up and across in all directions so the guard pixels are REQUIRED to stop the vectorize trying to go outside the array and definitely not optional.

You will note when I make a CCL_MAP it is always created bm.bmWidth+2, bm.bmHeight+2 to allow for the guard pixels and they are manually filled in to background color and the bitmap loaded to 1,1. Also make sure you guard pixel color is the background color and not the color you are scanning for.

Your violation error above can only come about because somehow you violated the guard pixel requirements which makes sure the raster process stays inside the array dimensions. That is the safest way to do the containment if you try limiting the array index itself you will find you have issues getting guaranteed closing of the shapes.

modified 13-Apr-14 9:29am.

QuestionBitwise operation for mod operation Pin
econy31-Mar-14 4:23
econy31-Mar-14 4:23 
AnswerRe: Bitwise operation for mod operation Pin
Richard MacCutchan31-Mar-14 21:38
mveRichard MacCutchan31-Mar-14 21:38 
AnswerRe: Bitwise operation for mod operation Pin
CPallini31-Mar-14 23:37
mveCPallini31-Mar-14 23:37 
QuestionDATABASE PROBLEM Pin
Fawaz Ajani31-Mar-14 1:01
Fawaz Ajani31-Mar-14 1:01 
AnswerRe: DATABASE PROBLEM Pin
Freak3031-Mar-14 4:42
Freak3031-Mar-14 4:42 
AnswerRe: DATABASE PROBLEM Pin
SujayG2-Apr-14 0:21
SujayG2-Apr-14 0:21 
QuestionRe: DATABASE PROBLEM Pin
David Crow2-Apr-14 17:27
David Crow2-Apr-14 17:27 
QuestionHow to use ReadFile API Read HID Device synchronous Pin
cedricvictor30-Mar-14 6:32
cedricvictor30-Mar-14 6:32 
AnswerRe: How to use ReadFile API Read HID Device synchronous Pin
Richard Andrew x6431-Mar-14 10:13
professionalRichard Andrew x6431-Mar-14 10:13 
AnswerRe: How to use ReadFile API Read HID Device synchronous Pin
Heng Xiangzhong8-Apr-14 23:31
Heng Xiangzhong8-Apr-14 23:31 
Question#imports for MS Office2013 Pin
Bryan Anslow28-Mar-14 10:08
Bryan Anslow28-Mar-14 10:08 
AnswerRe: #imports for MS Office2013 Pin
SujayG1-Apr-14 22:26
SujayG1-Apr-14 22:26 
GeneralRe: #imports for MS Office2013 Pin
Bryan Anslow2-Apr-14 4:23
Bryan Anslow2-Apr-14 4:23 
GeneralRe: #imports for MS Office2013 Pin
SujayG3-Apr-14 1:04
SujayG3-Apr-14 1:04 
GeneralRe: #imports for MS Office2013 Pin
Bryan Anslow3-Apr-14 5:02
Bryan Anslow3-Apr-14 5:02 
GeneralRe: #imports for MS Office2013 Pin
SujayG4-Apr-14 18:43
SujayG4-Apr-14 18:43 
QuestionAn algorithm question Pin
econy26-Mar-14 15:53
econy26-Mar-14 15:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.