Next Version - Wish for constrain camera proportions
-
- Posts: 35
- Joined: Thu Nov 09, 2006 12:02 am
- Location: New Zealand
Next Version - Wish for constrain camera proportions
How is the next version coming along. Is there a roadmap and a feature list anywhere?
One thing that would be very handy would be the ability to constrain the proportions of the camera when you set the width and the height.
Currently I have to open up photoshop and work it out from there - there must be some kind of simple mathematical calculation but I'm not very mathematical... I'm a user interface fanatic
One thing that would be very handy would be the ability to constrain the proportions of the camera when you set the width and the height.
Currently I have to open up photoshop and work it out from there - there must be some kind of simple mathematical calculation but I'm not very mathematical... I'm a user interface fanatic
As far as a roadmap, it's a when it's ready type thing. There is no schedule. As far as feature lists, there is the feature request here on the forum and released features are in the README.
As far as your request on the ability to constrain the proportions of the camera...
can you elaborate a bit more as I don't get what you mean.
I take it to mean that you want selectable capture sizes which would constrain the abilities of ZM since many cameras don't conform to standards these days and might be to limiting.
As far as your request on the ability to constrain the proportions of the camera...
can you elaborate a bit more as I don't get what you mean.
I take it to mean that you want selectable capture sizes which would constrain the abilities of ZM since many cameras don't conform to standards these days and might be to limiting.
-
- Posts: 35
- Joined: Thu Nov 09, 2006 12:02 am
- Location: New Zealand
-
- Posts: 35
- Joined: Thu Nov 09, 2006 12:02 am
- Location: New Zealand
I think you're missing the point.
Today I spent about 30 minutes tabbing between photoshop and zoneminder while I was resizing the camera size to suit. I had to do this to make sure my monitor looked perfect for my client. If the image was not correctly proportioned - then a licence plate might not be recognisable, or a face might look slightly twisted making identification that much harder.
Why do you think TV screens are proportional
If there was just that one little bit of math there and a checkbox to turn it on then it would have saved me a big chunk of time.
I've proved that there is a use for this feature because I'd use it - and because there are millions of people just like me out there on the internet (just waiting to find zoneminder) why would we want them to also waste their time when its been identified as useful.
If somebody could tell me the math to scale things like this then I could probably get the Javascript written here at work and then submit it to the forums.
Today I spent about 30 minutes tabbing between photoshop and zoneminder while I was resizing the camera size to suit. I had to do this to make sure my monitor looked perfect for my client. If the image was not correctly proportioned - then a licence plate might not be recognisable, or a face might look slightly twisted making identification that much harder.
Why do you think TV screens are proportional
If there was just that one little bit of math there and a checkbox to turn it on then it would have saved me a big chunk of time.
I've proved that there is a use for this feature because I'd use it - and because there are millions of people just like me out there on the internet (just waiting to find zoneminder) why would we want them to also waste their time when its been identified as useful.
If somebody could tell me the math to scale things like this then I could probably get the Javascript written here at work and then submit it to the forums.
Most cameras give images of 4:3 aspect ratio. So it's as simple as this:
Height = (Width * 3) / 4
You could implement it this way: whenever the "Capture Width" textbox changes, fill the "Capture Height" box based on the above formula. It shouldn't be vice-versa, as if the user is not satisfied with the result, he/she can type any desired value in "Capture Height", without "Capture Width" being automatically re-calculated. The users always fill the first box first, so this would be a really nice, handy feature. (Perhaps connected to a "4:3 Aspect Ratio" checkbox's value - in this case it should be vice-versa)
Finding the best resolution is usually trial-based, anyway. I found many other working resolutions as well than those specified on the box. It's worth trying.
Height = (Width * 3) / 4
You could implement it this way: whenever the "Capture Width" textbox changes, fill the "Capture Height" box based on the above formula. It shouldn't be vice-versa, as if the user is not satisfied with the result, he/she can type any desired value in "Capture Height", without "Capture Width" being automatically re-calculated. The users always fill the first box first, so this would be a really nice, handy feature. (Perhaps connected to a "4:3 Aspect Ratio" checkbox's value - in this case it should be vice-versa)
Finding the best resolution is usually trial-based, anyway. I found many other working resolutions as well than those specified on the box. It's worth trying.
v1.25.0 + Ubuntu Linux 12.04 Server
-
- Posts: 35
- Joined: Thu Nov 09, 2006 12:02 am
- Location: New Zealand
-
- Posts: 35
- Joined: Thu Nov 09, 2006 12:02 am
- Location: New Zealand
Preserve Aspect Ratio - Done!
This works for us. It is brilliant and it has already saved me plenty of time, hopefully Robi can use it and hopefully cordel can integrate it with the next version.
Ciao,... Dan
first change, goes in the script tag:
function preserve_aspect_ratio(edited)
{
if(document.getElementById('aspect_ratio_checkbox').checked == true)
{
monitor_width = parseInt(document.getElementById('monitor_camera_width').value);
monitor_height = parseInt(document.getElementById('monitor_camera_height').value);
switch(edited)
{
case 'width':
document.getElementById('monitor_camera_height').value = Math.round((monitor_width * 3) / 4);
break;
case 'height':
document.getElementById('monitor_camera_width').value = Math.round((monitor_height*4) / 3);
break;
}
}
return '';
}
And second change, goes in the relevant part, do a search for "$zmSlangCaptureWidth":
<tr><td align="left" class="text"><?= $zmSlangCaptureWidth ?> (<?= $zmSlangPixels ?>)</td><td align="left" class="text"><input type="text" name="new_monitor[Width]" value="<?= $new_monitor['Width'] ?>" size="4" class="form" id='monitor_camera_width' onkeyup='preserve_aspect_ratio("width");' /></td></tr>
<tr><td align="left" class="text"><?= $zmSlangCaptureHeight ?> (<?= $zmSlangPixels ?>)</td><td align="left" class="text"><input type="text" name="new_monitor[Height]" value="<?= $new_monitor['Height'] ?>" size="4" class="form" id='monitor_camera_height' onkeyup='preserve_aspect_ratio("height");' /></td></tr>
<tr><td align="left" class="text"></td><td align="left" class="text"><input type="checkbox" name="aspect_ratio_checkbox" value="true" class="form" id='aspect_ratio_checkbox' /><?= $zmSlangPreserveAspect ?></td></tr>
and third change, add to language file:
$zmSlangPreserveAspect = 'Preserve Aspect Ratio';
Ciao,... Dan
first change, goes in the script tag:
function preserve_aspect_ratio(edited)
{
if(document.getElementById('aspect_ratio_checkbox').checked == true)
{
monitor_width = parseInt(document.getElementById('monitor_camera_width').value);
monitor_height = parseInt(document.getElementById('monitor_camera_height').value);
switch(edited)
{
case 'width':
document.getElementById('monitor_camera_height').value = Math.round((monitor_width * 3) / 4);
break;
case 'height':
document.getElementById('monitor_camera_width').value = Math.round((monitor_height*4) / 3);
break;
}
}
return '';
}
And second change, goes in the relevant part, do a search for "$zmSlangCaptureWidth":
<tr><td align="left" class="text"><?= $zmSlangCaptureWidth ?> (<?= $zmSlangPixels ?>)</td><td align="left" class="text"><input type="text" name="new_monitor[Width]" value="<?= $new_monitor['Width'] ?>" size="4" class="form" id='monitor_camera_width' onkeyup='preserve_aspect_ratio("width");' /></td></tr>
<tr><td align="left" class="text"><?= $zmSlangCaptureHeight ?> (<?= $zmSlangPixels ?>)</td><td align="left" class="text"><input type="text" name="new_monitor[Height]" value="<?= $new_monitor['Height'] ?>" size="4" class="form" id='monitor_camera_height' onkeyup='preserve_aspect_ratio("height");' /></td></tr>
<tr><td align="left" class="text"></td><td align="left" class="text"><input type="checkbox" name="aspect_ratio_checkbox" value="true" class="form" id='aspect_ratio_checkbox' /><?= $zmSlangPreserveAspect ?></td></tr>
and third change, add to language file:
$zmSlangPreserveAspect = 'Preserve Aspect Ratio';
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
Phil
A suggestion, can it default to how it is now but have an option to display differently (as zm4ms does) that way you could record at 720 x 288 but display at 368 x 288 IF the display is selected to be differnt from the record.
But
This will require some interplolation else the results will be horrible
A suggestion, can it default to how it is now but have an option to display differently (as zm4ms does) that way you could record at 720 x 288 but display at 368 x 288 IF the display is selected to be differnt from the record.
But
This will require some interplolation else the results will be horrible
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Use the settings dialog, add an option like ZM_DEFAULT_ASPECT_RATIO, with two text boxes separated by ":". By default they should contain 4:3, but the user can enter any default aspect ratio he/she wants. This saves in the db as a global option.zoneminder wrote:I missed this thread the first time around I think but I have added an entry into bugzilla. The only thing I am a bit concerned about is hardcoding the 3/4 ratio but that may be able to be worked around.
In the monitor settings on the Source tab, add a checkbox called 'Keep aspect ratio', then whenever width or height is changed, the other one gets calculated based on the formula above with the values from the settings. If the Checkbox is cleared, the re-calculation doesn't occur. All the values, including checkbox value, are saved in the database, on a per monitor basis (default: Checked).
v1.25.0 + Ubuntu Linux 12.04 Server