|
Crop and Scale modules don't change IMAGE_WIDTH variable Pi Robot from United States [211 posts] |
0 months
|
 Buy the Phidget Adv. Servo 8 from Trossen Robotics |
Hi STeven,
Using RR version 2.5.9, I noticed that when I Crop a 320x240 image to a lesser width, say 280x240, the IMAGE_WIDTH variable stays constant at 320. Ditto when I use the Scale module. Is this a bug or should I be using the CROP_X_START and CROP_X_END variables?
Thanks!
patrick
|
|
|
Steven Gentner from United States [2177 posts] |
0 months
|
Patrick,
Everything checks out. The scale and Crop do appear to change the variables both in tests and according to the code. Perhaps you need to pop the display_variables module AFTER the Crop and Scale module? If you place it before then it will reflect the variables at that point in the pipeline.
If not can you include a robofile that shows this issue?
STeven.
|
|
|
Pi Robot from United States [211 posts] |
0 months
|
Hi STeven,
Thanks for checking. Yes, I have the Display_Variables module AFTER the crop module and it still displays the original image width. Here is the simplest possible .robo file that just has the Crop module followed by the Display_Variables and on my screen I get 320 for the displayed Image_Width no matter how I set the Crop X Start and X End. I am connecting to a Logitech Pro 9000 webcam and the image gets cropped fine as far as the picture is concerned.
--patrick
program.robo
|
|
|
Steven Gentner from United States [2177 posts] |
0 months
|
Cool, thanks for the robofile. You were using the crop and we were checking scale ... the crop module did NOT update the IMAGE_WIDTH and IMAGE_HEIGHT variables. Can you download 2.5.11 and see if that helps?
Thanks,
STeven.
|
|
|
Pi Robot from United States [211 posts] |
0 months
|
Hi STeven,
I just tried it with 2.5.11 and, alas, I have the same problem...
--patrick
|
|
|
Steven Gentner from United States [2177 posts] |
0 months
|
Hmm, perhaps I replied too quickly and the new version did not yet get up to the site. Can you confirm that you are running 2.5.11 in the title bar?
Thanks,
STeven.
|
|
|
Pi Robot from United States [211 posts] |
0 months
|
Yes, it is 2.5.11 in the title bar. Image_Width is now correct after a Scale but not after a Crop.
--patrick
|
|
|
Steven Gentner from United States [2177 posts] |
0 months
|
Ok, can you try with 2.6.0 once more?
Thanks,
STeven.
|
|
|
Pi Robot from United States [211 posts] |
0 months
|
Hi STeven,
I just gave it a go with 2.6.0 and now the Image_Width and Image_Height variables display "N/A" after a Crop or Scale. They display fine without either of these module before the Display_Variables module.
--patrick
|
|
|
Steven Gentner from United States [2177 posts] |
0 months
|
patrick,
Opps, once more. There was an issue with the display variables module not liking how we adjusted the image_width and image_height. This should be fixed in 2.6.1. Included below is our test robofile.
:-)
STeven.
program.robo
|
|
|
Pi Robot from United States [211 posts] |
0 months
|
Hi STeven,
Works like a charm in 2.6.1. Many thanks!
--patrick
|
|