CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    May 2014
    Posts
    205

    concept for saving data into objects

    I would like to create program which will analyse bitmap so would need good concept to save data. I am interested about the theory and I realize that i must to think this carefully because bad concept could create insufficient memory or inefficient program. Basically I want my program work with HSV or HSL model so I would need to convert the bitmap to HSL, but I am not sure if I should convert it first and then analyse all pixels or should I start to analyse the bitmap and make the conversion to HSL during it. But my main question is what method to choose to save the data in memory. Even that I would start with very small, it should work also with bigger image like image having 1200 or even 4200 px on height. So the program should first analyse all columns of pixels in the image so for example 1200x800 px image has 1200 columns. So I would like to know if is it possible to create such object which would have such structure like this
    Obj->basicColumnData->black->columns[name]->group
    and in the place of columns should be placed data for every column. I would look for groups of pixels in the column, so in the result the column x could bear e.g. 500 groups of information and every group should contain the range of pixels e.g. group 1 should contain y value from 0 to 20, group 2 should contain value from 25-27 and so on. So I would create 1200 columns bear many of groups. This would be contained in "black" or "white" member to contain the data. This is just simplified idea, but the whole object should contain next data not just basicColumnData... So there should be another members bearing information calculated from the selected data.

    So my question is what kind of method of saving data use for this? Should I use heap and dynamic allocated memory or should I create custom class, which will define every member, but these members will have to be dynamic memory? With the dynamic memory is there problem that there could be not enough memory to create such big object?
    Last edited by crazy boy; May 18th, 2014 at 07:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured