skew angel correction using java [closed]

asked Jan 2 '0

david cairns gravatar image

I read the tutorial about skew angel correction in this site. but i need to convert those code in java.

so please help me how to convert code in java.

Preview: (hide)

Closed for the following reason spam or advertising by sturkmen
close date 2020-11-07 12:55:45.126690

Comments

1

what if you just start, and ask for help where you run into problems ?

show us, what you've tried so far, please !

berak gravatar imageberak (Jan 2 '0)edit

I have tried this :-

BOOL CScannedDocTestDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
    m_Image.Destroy();
    HRESULT hr = m_Image.Load(lpszPathName);

    if(SUCCEEDED(hr))
    {
        int nPitch = m_Image.GetPitch();
        int nWidth = m_Image.GetWidth();
        int nHeight = m_Image.GetHeight();

        int nBytesPerPixel = m_Image.GetBPP() / 8;
        if(nBytesPerPixel)
        { 
            byte* pGrayScaleBits = NULL;
            // Get a gray scaled bitmap and bitmap bits from the original image
            m_hBmpGrayScale = ImageFunctions::GetGrayScaleImage((HBITMAP)m_Image, 
            nWidth, nHeight, nBytesPerPixel, nPitch, &pGrayScaleBits);
            if(pGrayScaleBits != NULL)
            {
                // Find out if the image is a regular image or text image
david cairns gravatar imagedavid cairns (Jan 3 '0)edit