Given that you have swap rates and Cap prices (ATM, I assume), you can back out the IVs for the time periods using by bootstrapping. Strictly speaking, you would need Caplet prices for the given strikes.
In such a case,
- You would look at the shortest dated cap and (assume) it is made up of only one caplet.
- You can then use black's formula and back out the IV for this price.
- Once this is fixed, we move on to the next cap. This cap is again broken down in to two caplets (say), where the IV for the first caplet is as calculated in step 2 and the caplet is re-priced for the new strike.
- Now that you have the Cap price, the first caplet price, you can back out the price of the remaining caplet and use that to back out the IV for the second period.
- This method is repeated till the longest dated cap.
for in between terms, you can assume the IV to be constant (piece-wise constant volatility) or some form of interpolation.