borevitzlab / timestreamlib

DEPRECATED. Please use the current version of the TimeStream tools at https://gitlab.com/appf-anu/pyts2.
https://gitlab.com/appf-anu/pyts2
GNU General Public License v3.0
7 stars 4 forks source link

Resizer code refactoring and cleanup #121

Closed TimeScience closed 9 years ago

TimeScience commented 9 years ago

TimeStream resizer code needs to be organized, cleaned up and integrated into timestream lib. Probably requires kevin and joel to discuss.

kdm9 commented 9 years ago

Yup, i've been meaning to do this for a while.

Joelgranados commented 9 years ago

Where is this code and can we put it into a pipeline component?

kdm9 commented 9 years ago

Yeah, was going to make output size an option to the image writing pipe component. Will dredge the code up tomorrow

Joelgranados commented 9 years ago

This is present in my repo. Here are a few examples of pipeline.yml that generate the resized output:

Using the scale factor instead of actual width, height.

pipeline:
- name: resize
  mess: "---Resizing to 50%---"
  resolution: 0.5 
- name: imagewrite
  mess: '---Writing Image---'
  outstream: 50-orig
- name: resize
  mess: "---Resizing to 75%---"
  resolution: 0.5 
- name: imagewrite
  mess: '---Writing Image---'
  outstream: 75-orig

outstreams:                                                                                                                                                         
  - { name: 50-orig }
  - { name: 75-orig }

general:
  startDate: { year: 2014, month: 06, day: 25, hour: 9, minute: 0, second: 0}
  enddate: {}
  startHourRange: { hour: 0, minute: 0, second: 0}
  endHourRange: { hour: 23, minute: 59, second: 59} 
  timeInterval: 900 
  visualise: False
  outputPrefix: BVZ0036-GC02L-C01~

Here is one with by setting width/hegiht

Pipeline:
- name: resize
  mess: "---Resizing to 1280x1920---"                                                                                                                                         
  resolution: [1280,1920]
- name: imagewrite
  mess: '---Writing Image---'
  outstream: orig

outstreams:
    - { name: orig }

general:
  startDate: { year: 2014, month: 06, day: 25, hour: 9, minute: 0, second: 0}
  enddate: {}
  startHourRange: { hour: 0, minute: 0, second: 0}
  endHourRange: { hour: 23, minute: 59, second: 59}
  timeInterval: 900
  visualise: False
  outputPrefix: BVZ0036-GC02L-C01~1280x1920

Test and reopen if it does not work :)