Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

size of the image #17

Open
vojtechabraham opened this issue Nov 7, 2017 · 3 comments
Open

size of the image #17

vojtechabraham opened this issue Nov 7, 2017 · 3 comments

Comments

@vojtechabraham
Copy link

Hello,
I am using v0.99 on W8.1 x64 bit machine and I can see just left upper corner of the image
obrazek
full image has 4608x3072 pixels
obrazek
I can not move or shink the picture, I probably skipped some basic point of the instructions.
Many thanks for your help!

@JoakimSoderberg
Copy link
Owner

JoakimSoderberg commented Nov 9, 2017

Hello,

It's quite a bit of time since I used this program myself. So I don't even remember if I've even tried such a highres image. Especially at the time this tool was written I guess working with such highres images in relation to object detection was not even something considered.

However looking at the code:

cvShowCroppedImage(param->miniw_name, param->img_src, cvRect32fFromRect(cvScaleRect(param->rect, 1 / param->scale_factor), param->rotate), cvPointTo32f(param->shear), param->cap_scale_factor);

To show the image this OpenCV function is used:

CVAPI(void) cvShowCroppedImage(const char* w_name, IplImage* img, CvRect32f rect32f, CvPoint2D32f shear, float cap_scale_factor)
{
CvRect rect = cvRectFromRect32f(rect32f);
if (rect.width <= 0 || rect.height <= 0) return;
IplImage* crop = cvCreateImage(cvSize(rect.width, rect.height), img->depth, img->nChannels);
cvCropImageROI(img, crop, rect32f, shear);
if (cap_scale_factor != 1.0f)
{
IplImage* crop_resize = cvCreateImage(cvSize(rect.width * cap_scale_factor, rect.height * cap_scale_factor), img->depth, img->nChannels);
cvResize(crop, crop_resize);
cvShowImage(w_name, crop);
cvReleaseImage(&crop_resize);
}
else
cvShowImage(w_name, crop);
cvReleaseImage(&crop);
}

This crops the image to the scale factor as you see... so maybe fiddling with that might help?

The instructions for the tool written by the original author can be found here:
https://code.google.com/archive/p/imageclipper/

@JoakimSoderberg
Copy link
Owner

@vojt-a Anything to add?

@vojtechabraham
Copy link
Author

vojtechabraham commented Nov 23, 2017

Dear Joakim,
thank you for the answer, SOLVED! I found another application: XnView MP - https://www.xnview.com/en/ . It has a very nice button "CLIP & SAVE & NEXT" , so you just open the first picture of the folder and then it goes fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants