GithubHelp home page GithubHelp logo

simple-iphone-image-processing's People

Watchers

James Cloos avatar

simple-iphone-image-processing's Issues

Memory Leak on Image class with the UIImage constructor

Use the Image::createImage(UIImage*,int width,int height) method to create a 
new Image object
Notice that upon destruction of the object the m_imageData variable does not 
get released

To fix this add:
m_ownsData=true;
To the bottom of the constructor mentioned at the top of this issue.


Original issue reported on code.google.com by [email protected] on 29 Sep 2011 at 6:45

Image::getPercentSet() not implemented?

What steps will reproduce the problem?
1. invoke getPercentSet, linking fails 

What is the expected output? What do you see instead?
I'm expecting all of the functions in Image.h to be implemented in Image.mm

What version of the product are you using? On what operating system?
svn revision 16

Please provide any additional information below.
I'm completely new to C/Obj-C/XCode/iPhone, so this may be my issue.  I see 
there are a handful of functions not implemented in Image.mm including 
getPercentSet.

Original issue reported on code.google.com by [email protected] on 13 Jul 2010 at 11:22

Gaussian blur bug

What steps will reproduce the problem?
1. Improve gaussianBlur() or take my improved code
2.
3.

What is the expected output? What do you see instead?
gaussianBlur() reduces image by 5 pixels in the upper left corner.

What version of the product are you using? On what operating system?
xCode and the newest version (13th july 2010)

Please provide any additional information below.
Fixed gaussianBlur() function:

ImageWrapper *Image::gaussianBlur() {
    Image *result=new Image(m_width, m_height);
    for(int y = 0; y < m_height; y++) {
        for(int x = 0; x < m_width; x++) {

            int val = (*this)[y][x]*41; //Declare currents pixels value
            int middle = 41; //Declare average

            if (x > 0)                          { val += (*this)[y][x-1]    *26;middle += 26;}
            if (x > 1)                          { val += (*this)[y][x-2]    *7; middle += 7;}
            if (x < m_width-1)                  { val += (*this)[y][x+1]    *26;middle += 26;}
            if (x < m_width-2)                  { val += (*this)[y][x+2]    *7; middle += 7;}

            if (y > 0)                          { val += (*this)[y-1][x]    *26;middle += 26;}
            if (y > 0 && x > 0)                 { val += (*this)[y-1][x-1]  *16;middle += 16;}
            if (y > 0 && x > 1)                 { val += (*this)[y-1][x-2]  *4; middle += 4;}
            if (y > 0 && x < m_width-1)         { val += (*this)[y-1][x+1]  *16;middle += 16;}
            if (y > 0 && x < m_width-2)         { val += (*this)[y-1][x+2]  *4; middle += 4;}

            if (y > 1)                          { val += (*this)[y-2][x]    *7; middle += 7;}
            if (y > 1 && x > 0)                 { val += (*this)[y-2][x-1]  *4; middle += 4;}
            if (y > 1 && x > 1)                 { val += (*this)[y-2][x-2]  *1; middle += 1;}
            if (y > 1 && x < m_width-1)         { val += (*this)[y-2][x+1]  *4; middle += 4;}
            if (y > 1 && x < m_width-2)         { val += (*this)[y-2][x+2]  *1; middle += 1;}

            if (y < m_height-1)                 { val += (*this)[y+1][x]    *26;middle += 26;}
            if (y < m_height-1 && x > 0)        { val += (*this)[y+1][x-1]  *16;middle += 16;}
            if (y < m_height-1 && x > 1)        { val += (*this)[y+1][x-2]  *4; middle += 4;}
            if (y < m_height-1 && x < m_width-1){ val += (*this)[y+1][x+1]  *16;middle += 16;}
            if (y < m_height-1 && x < m_width-2){ val += (*this)[y+1][x+2]  *4; middle += 4;}

            if (y < m_height-2)                 { val += (*this)[y+2][x]    *7; middle += 7;}
            if (y < m_height-2 && x > 0)        { val += (*this)[y+2][x-1]  *4; middle += 4;}
            if (y < m_height-2 && x > 1)        { val += (*this)[y+2][x-2]  *1; middle += 1;}
            if (y < m_height-2 && x < m_width-1){ val += (*this)[y+2][x+1]  *4; middle += 4;}
            if (y < m_height-2 && x < m_width-2){ val += (*this)[y+2][x+2]  *1; middle += 1;}

            (*result)[y][x] = (int)val/middle; //Calculating average value for given pixel
        }
    }

    return [ImageWrapper imageWithCPPImage:result]; //Return the image
}

Original issue reported on code.google.com by [email protected] on 13 Jul 2010 at 7:10

Unit tests are not compiling - temporarily removed

NSPoint and NSRect are not available on the device.

I've temporarily typedeffed them to CGPoint and CGRect.

This should work on the device - we'll need to work out a way of switching
in the definitions for Simulator builds and unit test builds.

Original issue reported on code.google.com by [email protected] on 15 Apr 2009 at 3:58

Investigate and reintegrate region code.

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


Please use labels and text to provide additional information.


Original issue reported on code.google.com by [email protected] on 27 May 2009 at 5:54

Move C++ behind objective-C wrapper

It would be good it the C++ code could all be moved behind the objective-C
wrapper. This would remove the need for having Objective-C++ in all the
project code.

Original issue reported on code.google.com by [email protected] on 14 Mar 2009 at 12:44

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.