Combination of image with pcomb

Hi all,
Plenty of HDR images need to be combined cause each one represents specific part of the scene. The command is like this:

for t in {00..96}
do
  pcomb -h -e 'ro=ri(1)+ri(2)+ri(3)+ri(4)+ri(5)+ri(6)+ri(7)+ri(8);go=gi(1)+gi(2)+gi(3)+gi(4)+gi(5)+gi(6)+gi(7)+gi(8);\
  bo=bi(1)+bi(2)+bi(3)+bi(4)+bi(5)+bi(6)+bi(7)+bi(8)' \
  -o $ph3dhdr/hdr1/$t.hdr -o $ph3dhdr/hdr2/$t.hdr -o $ph3dhdr/hdr3/$t.hdr -o $ph3dhdr/hdr4/$t.hdr \
  -o $ph3dhdr/hdr5/$t.hdr -o $ph3dhdr/hdr6/$t.hdr -o $ph3dhdr/hdr7/$t.hdr -o $ph3dhdr/hdr8/$t.hdr > $ph3dhdr/hdrt/$t.hdr
done

The error is like this:


Only when I reduced the number of images to 3 then does pcomb work well.

pcomb -h -e 'ro=ri(1)+ri(2)+ri(3);go=gi(1)+gi(2)+gi(3); bo=bi(1)+bi(2)+bi(3)' \
  -o $ph3dhdr/hdr1/$t.hdr -o $ph3dhdr/hdr2/$t.hdr -o $ph3dhdr/hdr3/$t.hdr > $ph3dhdr/hdrt/$t.hdr

Is this problem related to the attribute or limit of pcomb? Any reply is appreciated!

Hi @lee

The issue seems to be that you have a slash character ('\') inside your single-quoted argument. Can you place the entire -e argument on one line?

Hi @Nathaniel_Jones,
Thanks for your rapid reply!
It works when I remove \ in the single-quoted argument. And I tried another efficient way before your reply. And this way works well when \ exists.

pcomb $ph3dhdr/hdr1/$t.hdr -s +1 $ph3dhdr/hdr2/$t.hdr-s +1 $ph3dhdr/hdr3/$t.hdr > $ph3dhdr/hdrt/$t.hdr